mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix Unicode checks for Windows using icu.h
This commit is contained in:
parent
5f259c1658
commit
4c1b2ef7d6
2 changed files with 6 additions and 6 deletions
|
@ -3025,7 +3025,7 @@ GSPrivateICUCStringEncoding()
|
|||
if (icuEnc == GSUndefinedEncoding)
|
||||
{
|
||||
const char *encoding = 0;
|
||||
#if HAVE_UNICODE_UCNV_H
|
||||
#if defined(HAVE_UNICODE_UCNV_H) || defined(HAVE_ICU_H)
|
||||
const char *defaultName;
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
|
||||
|
|
|
@ -740,7 +740,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_UNICODE_UNORM2_H)
|
||||
#if defined(HAVE_UNICODE_UNORM2_H) || defined(HAVE_ICU_H)
|
||||
- (NSString *) _normalizedICUStringOfType: (const char*)normalization
|
||||
mode: (UNormalization2Mode)mode
|
||||
{
|
||||
|
@ -1856,7 +1856,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
|
||||
- (NSString *) decomposedStringWithCompatibilityMapping
|
||||
{
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
#if (GS_USE_ICU == 1) && (defined(HAVE_UNICODE_UNORM2_H) || defined(HAVE_ICU_H))
|
||||
return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_DECOMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
@ -1865,7 +1865,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
|
||||
- (NSString *) decomposedStringWithCanonicalMapping
|
||||
{
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
#if (GS_USE_ICU == 1) && (defined(HAVE_UNICODE_UNORM2_H) || defined(HAVE_ICU_H))
|
||||
return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_DECOMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
@ -4492,7 +4492,7 @@ static NSFileManager *fm = nil;
|
|||
|
||||
- (NSString *) precomposedStringWithCompatibilityMapping
|
||||
{
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
#if (GS_USE_ICU == 1) && (defined(HAVE_UNICODE_UNORM2_H) || defined(HAVE_ICU_H))
|
||||
return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_COMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
@ -4501,7 +4501,7 @@ static NSFileManager *fm = nil;
|
|||
|
||||
- (NSString *) precomposedStringWithCanonicalMapping
|
||||
{
|
||||
#if (GS_USE_ICU == 1) && defined(HAVE_UNICODE_UNORM2_H)
|
||||
#if (GS_USE_ICU == 1) && (defined(HAVE_UNICODE_UNORM2_H) || defined(HAVE_ICU_H))
|
||||
return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_COMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
|
|
Loading…
Reference in a new issue