mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
fix check for unicode normalisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36871 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
292ae66048
commit
2f99328775
3 changed files with 9 additions and 6 deletions
|
@ -662,6 +662,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_UNICODE_UNORM2_H)
|
||||
- (NSString *) _normalizedICUStringOfType: (const char*)normalization
|
||||
mode: (UNormalization2Mode)mode
|
||||
{
|
||||
|
@ -750,6 +751,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
return AUTORELEASE(newString);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+ (void) atExit
|
||||
{
|
||||
|
@ -1769,7 +1771,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
|
||||
- (NSString *) decomposedStringWithCompatibilityMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_DECOMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
@ -1778,7 +1780,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
|
||||
- (NSString *) decomposedStringWithCanonicalMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_DECOMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
@ -3931,7 +3933,7 @@ static NSFileManager *fm = nil;
|
|||
|
||||
- (NSString *) precomposedStringWithCompatibilityMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_COMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
@ -3940,7 +3942,7 @@ static NSFileManager *fm = nil;
|
|||
|
||||
- (NSString *) precomposedStringWithCanonicalMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_COMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue