mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-24 09:19:15 +00:00
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:
parent
04cc39ee88
commit
805514db3e
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue