mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix for locale handling changes in ICU 64
Since ICU 64, the locale handling has changed such that passing an empty string to uloc_canonicalize no longer returns the en_US_POSIX locale as it did in previous versions. See https://icu.unicode.org/download/64#h.plg55ia6o3du
This commit is contained in:
parent
37f5a2f9e1
commit
1a3d869ab1
1 changed files with 8 additions and 0 deletions
|
@ -536,7 +536,15 @@ static NSRecursiveLock *classLock = nil;
|
|||
if (nil == systemLocale)
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 64
|
||||
/* Since ICU 64, the locale handling has changed such that passing an
|
||||
empty string to uloc_canonicalize no longer returns the en_US_POSIX
|
||||
locale as it did in previous versions.
|
||||
See https://icu.unicode.org/download/64#h.plg55ia6o3du */
|
||||
systemLocale = [[NSLocale alloc] initWithLocaleIdentifier: @"en_US_POSIX"];
|
||||
#else
|
||||
systemLocale = [[NSLocale alloc] initWithLocaleIdentifier: @""];
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue