00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef UNORM_H
00016 #define UNORM_H
00017
00018 #include "unicode/utypes.h"
00019 #include "unicode/uiter.h"
00020
00124 typedef enum {
00126 UNORM_NONE = 1,
00128 UNORM_NFD = 2,
00130 UNORM_NFKD = 3,
00132 UNORM_NFC = 4,
00134 UNORM_DEFAULT = UNORM_NFC,
00136 UNORM_NFKC =5,
00138 UNORM_FCD = 6,
00139
00141 UNORM_MODE_COUNT,
00142
00143
00144
00149 UCOL_NO_NORMALIZATION = 1,
00154 UCOL_DECOMP_CAN = 2,
00159 UCOL_DECOMP_COMPAT = 3,
00164 UCOL_DEFAULT_NORMALIZATION = UCOL_DECOMP_COMPAT,
00169 UCOL_DECOMP_CAN_COMP_COMPAT = 4,
00174 UCOL_DECOMP_COMPAT_COMP_CAN =5,
00175
00180 UCOL_IGNORE_HANGUL = 16,
00185 UNORM_IGNORE_HANGUL = 16
00186 } UNormalizationMode;
00187
00207 U_CAPI int32_t U_EXPORT2
00208 unorm_normalize(const UChar *source, int32_t sourceLength,
00209 UNormalizationMode mode, int32_t options,
00210 UChar *result, int32_t resultLength,
00211 UErrorCode *status);
00212
00218 #define u_normalize unorm_normalize
00219
00225 typedef enum UNormalizationCheckResult {
00229 UNORM_NO,
00233 UNORM_YES,
00238 UNORM_MAYBE
00239 } UNormalizationCheckResult;
00240
00259 U_CAPI UNormalizationCheckResult U_EXPORT2
00260 unorm_quickCheck(const UChar *source, int32_t sourcelength,
00261 UNormalizationMode mode,
00262 UErrorCode *status);
00263
00337 U_CAPI int32_t U_EXPORT2
00338 unorm_next(UCharIterator *src,
00339 UChar *dest, int32_t destCapacity,
00340 UNormalizationMode mode, int32_t options,
00341 UBool doNormalize, UBool *pNeededToNormalize,
00342 UErrorCode *pErrorCode);
00343
00370 U_CAPI int32_t U_EXPORT2
00371 unorm_previous(UCharIterator *src,
00372 UChar *dest, int32_t destCapacity,
00373 UNormalizationMode mode, int32_t options,
00374 UBool doNormalize, UBool *pNeededToNormalize,
00375 UErrorCode *pErrorCode);
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414 U_CAPI int32_t U_EXPORT2
00415 unorm_concatenate(const UChar *left, int32_t leftLength,
00416 const UChar *right, int32_t rightLength,
00417 UChar *dest, int32_t destCapacity,
00418 UNormalizationMode mode, int32_t options,
00419 UErrorCode *pErrorCode);
00420
00421 #endif