66#include " RuntimePlatformAgnosticPch.h"
77#include " UnicodeText.h"
88#ifdef HAS_REAL_ICU
9+ #define U_USING_ICU_NAMESPACE 0
910#include < unicode/uchar.h>
1011#include < unicode/ustring.h>
1112#include < unicode/normalizer2.h>
@@ -31,24 +32,24 @@ namespace PlatformAgnostic
3132
3233#ifdef HAS_REAL_ICU
3334 // Helper ICU conversion facilities
34- static const Normalizer2* TranslateToICUNormalizer (NormalizationForm normalizationForm)
35+ static const icu:: Normalizer2* TranslateToICUNormalizer (NormalizationForm normalizationForm)
3536 {
3637 UErrorCode errorCode = U_ZERO_ERROR;
37- const Normalizer2* normalizer;
38+ const icu:: Normalizer2* normalizer;
3839
3940 switch (normalizationForm)
4041 {
4142 case NormalizationForm::C:
42- normalizer = Normalizer2::getNFCInstance (errorCode);
43+ normalizer = icu:: Normalizer2::getNFCInstance (errorCode);
4344 break ;
4445 case NormalizationForm::D:
45- normalizer = Normalizer2::getNFDInstance (errorCode);
46+ normalizer = icu:: Normalizer2::getNFDInstance (errorCode);
4647 break ;
4748 case NormalizationForm::KC:
48- normalizer = Normalizer2::getNFKCInstance (errorCode);
49+ normalizer = icu:: Normalizer2::getNFKCInstance (errorCode);
4950 break ;
5051 case NormalizationForm::KD:
51- normalizer = Normalizer2::getNFKDInstance (errorCode);
52+ normalizer = icu:: Normalizer2::getNFKDInstance (errorCode);
5253 break ;
5354 default :
5455 AssertMsg (false , " Unsupported normalization form" );
@@ -157,13 +158,13 @@ namespace PlatformAgnostic
157158 return -1 * invalidIndex; // mimicking the behavior of Win32 NormalizeString
158159 }
159160
160- const Normalizer2* normalizer = TranslateToICUNormalizer (normalizationForm);
161+ const icu:: Normalizer2* normalizer = TranslateToICUNormalizer (normalizationForm);
161162 Assert (normalizer != nullptr );
162163
163- const UnicodeString sourceUniStr ((const UChar*) sourceString, sourceLength);
164+ const icu:: UnicodeString sourceUniStr ((const UChar*) sourceString, sourceLength);
164165
165166 UErrorCode errorCode = U_ZERO_ERROR;
166- const UnicodeString destUniStr = normalizer->normalize (sourceUniStr, errorCode);
167+ const icu:: UnicodeString destUniStr = normalizer->normalize (sourceUniStr, errorCode);
167168
168169 if (U_FAILURE (errorCode))
169170 {
@@ -208,10 +209,10 @@ namespace PlatformAgnostic
208209 return false ;
209210 }
210211
211- const Normalizer2* normalizer = TranslateToICUNormalizer (normalizationForm);
212+ const icu:: Normalizer2* normalizer = TranslateToICUNormalizer (normalizationForm);
212213 Assert (normalizer != nullptr );
213214
214- const UnicodeString testUniStr ((const UChar*) testString, length);
215+ const icu:: UnicodeString testUniStr ((const UChar*) testString, length);
215216 bool isNormalized = normalizer->isNormalized (testUniStr, errorCode);
216217
217218 Assert (U_SUCCESS (errorCode));
0 commit comments