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
00020 #if !UCONFIG_NO_NORMALIZATION
00021
00022 #include "unicode/uiter.h"
00023 #include "unicode/unorm2.h"
00024
00025 #ifndef U_HIDE_DEPRECATED_API
00026
00136 typedef enum {
00138 UNORM_NONE = 1,
00140 UNORM_NFD = 2,
00142 UNORM_NFKD = 3,
00144 UNORM_NFC = 4,
00146 UNORM_DEFAULT = UNORM_NFC,
00148 UNORM_NFKC =5,
00150 UNORM_FCD = 6,
00151
00153 UNORM_MODE_COUNT
00154 } UNormalizationMode;
00155
00163 enum {
00170 UNORM_UNICODE_3_2=0x20
00171 };
00172
00188 #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20
00189
00209 U_STABLE int32_t U_EXPORT2
00210 unorm_normalize(const UChar *source, int32_t sourceLength,
00211 UNormalizationMode mode, int32_t options,
00212 UChar *result, int32_t resultLength,
00213 UErrorCode *status);
00214
00235 U_STABLE UNormalizationCheckResult U_EXPORT2
00236 unorm_quickCheck(const UChar *source, int32_t sourcelength,
00237 UNormalizationMode mode,
00238 UErrorCode *status);
00239
00256 U_STABLE UNormalizationCheckResult U_EXPORT2
00257 unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
00258 UNormalizationMode mode, int32_t options,
00259 UErrorCode *pErrorCode);
00260
00282 U_STABLE UBool U_EXPORT2
00283 unorm_isNormalized(const UChar *src, int32_t srcLength,
00284 UNormalizationMode mode,
00285 UErrorCode *pErrorCode);
00286
00304 U_STABLE UBool U_EXPORT2
00305 unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
00306 UNormalizationMode mode, int32_t options,
00307 UErrorCode *pErrorCode);
00308
00382 U_STABLE int32_t U_EXPORT2
00383 unorm_next(UCharIterator *src,
00384 UChar *dest, int32_t destCapacity,
00385 UNormalizationMode mode, int32_t options,
00386 UBool doNormalize, UBool *pNeededToNormalize,
00387 UErrorCode *pErrorCode);
00388
00415 U_STABLE int32_t U_EXPORT2
00416 unorm_previous(UCharIterator *src,
00417 UChar *dest, int32_t destCapacity,
00418 UNormalizationMode mode, int32_t options,
00419 UBool doNormalize, UBool *pNeededToNormalize,
00420 UErrorCode *pErrorCode);
00421
00459 U_STABLE int32_t U_EXPORT2
00460 unorm_concatenate(const UChar *left, int32_t leftLength,
00461 const UChar *right, int32_t rightLength,
00462 UChar *dest, int32_t destCapacity,
00463 UNormalizationMode mode, int32_t options,
00464 UErrorCode *pErrorCode);
00465
00466 #endif
00467 #endif
00468 #endif