Use faster and more comprehensive list of charsets.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23993 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2006-10-29 09:43:14 +00:00
parent 04cc39ee88
commit 805514db3e

View file

@ -438,6 +438,7 @@ GSEncodingFromLocale(const char *clocale)
/* Locale contains the 'codeset' section. Parse it and see
if we know what encoding this cooresponds to */
NSString *registry;
NSString *charset;
NSArray *array;
char *s;
@ -447,14 +448,15 @@ GSEncodingFromLocale(const char *clocale)
registry = [array objectAtIndex: 0];
if ([array count] > 1)
{
encodstr = [array lastObject];
charset = [NSString stringWithFormat: @"%@-%@",
registry, [array lastObject]];
}
else
{
encodstr = @"0";
charset = registry;
}
encoding = GSEncodingForRegistry(registry, encodstr);
encoding = [GSMimeDocument encodingFromCharset: charset];
}
else
{