ICU 4.8.1.1
4.8.1.1
|
00001 /* 00002 ******************************************************************************* 00003 * Copyright (c) 1996-2010, International Business Machines Corporation 00004 * and others. All Rights Reserved. 00005 ******************************************************************************* 00006 * File unorm.h 00007 * 00008 * Created by: Vladimir Weinstein 12052000 00009 * 00010 * Modification history : 00011 * 00012 * Date Name Description 00013 * 02/01/01 synwee Added normalization quickcheck enum and method. 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 00133 typedef enum { 00135 UNORM_NONE = 1, 00137 UNORM_NFD = 2, 00139 UNORM_NFKD = 3, 00141 UNORM_NFC = 4, 00143 UNORM_DEFAULT = UNORM_NFC, 00145 UNORM_NFKC =5, 00147 UNORM_FCD = 6, 00148 00150 UNORM_MODE_COUNT 00151 } UNormalizationMode; 00152 00160 enum { 00167 UNORM_UNICODE_3_2=0x20 00168 }; 00169 00185 #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20 00186 00206 U_STABLE int32_t U_EXPORT2 00207 unorm_normalize(const UChar *source, int32_t sourceLength, 00208 UNormalizationMode mode, int32_t options, 00209 UChar *result, int32_t resultLength, 00210 UErrorCode *status); 00211 00232 U_STABLE UNormalizationCheckResult U_EXPORT2 00233 unorm_quickCheck(const UChar *source, int32_t sourcelength, 00234 UNormalizationMode mode, 00235 UErrorCode *status); 00236 00253 U_STABLE UNormalizationCheckResult U_EXPORT2 00254 unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength, 00255 UNormalizationMode mode, int32_t options, 00256 UErrorCode *pErrorCode); 00257 00279 U_STABLE UBool U_EXPORT2 00280 unorm_isNormalized(const UChar *src, int32_t srcLength, 00281 UNormalizationMode mode, 00282 UErrorCode *pErrorCode); 00283 00301 U_STABLE UBool U_EXPORT2 00302 unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength, 00303 UNormalizationMode mode, int32_t options, 00304 UErrorCode *pErrorCode); 00305 00379 U_STABLE int32_t U_EXPORT2 00380 unorm_next(UCharIterator *src, 00381 UChar *dest, int32_t destCapacity, 00382 UNormalizationMode mode, int32_t options, 00383 UBool doNormalize, UBool *pNeededToNormalize, 00384 UErrorCode *pErrorCode); 00385 00412 U_STABLE int32_t U_EXPORT2 00413 unorm_previous(UCharIterator *src, 00414 UChar *dest, int32_t destCapacity, 00415 UNormalizationMode mode, int32_t options, 00416 UBool doNormalize, UBool *pNeededToNormalize, 00417 UErrorCode *pErrorCode); 00418 00456 U_STABLE int32_t U_EXPORT2 00457 unorm_concatenate(const UChar *left, int32_t leftLength, 00458 const UChar *right, int32_t rightLength, 00459 UChar *dest, int32_t destCapacity, 00460 UNormalizationMode mode, int32_t options, 00461 UErrorCode *pErrorCode); 00462 00468 #define UNORM_INPUT_IS_FCD 0x20000 00469 00475 #define U_COMPARE_IGNORE_CASE 0x10000 00476 00477 #ifndef U_COMPARE_CODE_POINT_ORDER 00478 /* see also unistr.h and ustring.h */ 00484 #define U_COMPARE_CODE_POINT_ORDER 0x8000 00485 #endif 00486 00553 U_STABLE int32_t U_EXPORT2 00554 unorm_compare(const UChar *s1, int32_t length1, 00555 const UChar *s2, int32_t length2, 00556 uint32_t options, 00557 UErrorCode *pErrorCode); 00558 00559 #endif /* #if !UCONFIG_NO_NORMALIZATION */ 00560 00561 #endif