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
00127
typedef enum {
00129
UNORM_NONE = 1,
00131
UNORM_NFD = 2,
00133
UNORM_NFKD = 3,
00135
UNORM_NFC = 4,
00137
UNORM_DEFAULT =
UNORM_NFC,
00139
UNORM_NFKC =5,
00141
UNORM_FCD = 6,
00142
00144
UNORM_MODE_COUNT
00145 }
UNormalizationMode;
00146
00147
#ifndef U_HIDE_DRAFT_API
00148
00156
enum {
00163
UNORM_UNICODE_3_2=0x20
00164 };
00165
00181
#define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20
00182
00183
#endif
00184
00203
U_STABLE int32_t U_EXPORT2
00204
unorm_normalize(
const UChar *source, int32_t sourceLength,
00205 UNormalizationMode mode, int32_t options,
00206 UChar *result, int32_t resultLength,
00207 UErrorCode *status);
00208
#endif
00209
00214
typedef enum UNormalizationCheckResult {
00218
UNORM_NO,
00222
UNORM_YES,
00227
UNORM_MAYBE
00228 }
UNormalizationCheckResult;
00229
#if !UCONFIG_NO_NORMALIZATION
00230
00250
U_STABLE UNormalizationCheckResult U_EXPORT2
00251
unorm_quickCheck(
const UChar *source, int32_t sourcelength,
00252 UNormalizationMode mode,
00253 UErrorCode *status);
00254
00271
U_DRAFT UNormalizationCheckResult U_EXPORT2
00272
unorm_quickCheckWithOptions(
const UChar *src, int32_t srcLength,
00273 UNormalizationMode mode, int32_t options,
00274 UErrorCode *pErrorCode);
00275
00297
U_STABLE UBool U_EXPORT2
00298
unorm_isNormalized(
const UChar *src, int32_t srcLength,
00299 UNormalizationMode mode,
00300 UErrorCode *pErrorCode);
00301
00319
U_DRAFT UBool U_EXPORT2
00320
unorm_isNormalizedWithOptions(
const UChar *src, int32_t srcLength,
00321 UNormalizationMode mode, int32_t options,
00322 UErrorCode *pErrorCode);
00323
00397
U_STABLE int32_t U_EXPORT2
00398
unorm_next(
UCharIterator *src,
00399 UChar *dest, int32_t destCapacity,
00400 UNormalizationMode mode, int32_t options,
00401 UBool doNormalize, UBool *pNeededToNormalize,
00402 UErrorCode *pErrorCode);
00403
00430
U_STABLE int32_t U_EXPORT2
00431
unorm_previous(
UCharIterator *src,
00432 UChar *dest, int32_t destCapacity,
00433 UNormalizationMode mode, int32_t options,
00434 UBool doNormalize, UBool *pNeededToNormalize,
00435 UErrorCode *pErrorCode);
00436
00474
U_STABLE int32_t U_EXPORT2
00475
unorm_concatenate(
const UChar *left, int32_t leftLength,
00476
const UChar *right, int32_t rightLength,
00477 UChar *dest, int32_t destCapacity,
00478 UNormalizationMode mode, int32_t options,
00479 UErrorCode *pErrorCode);
00480
00486
#define UNORM_INPUT_IS_FCD 0x20000
00487
00493
#define U_COMPARE_IGNORE_CASE 0x10000
00494
00495
#ifndef U_COMPARE_CODE_POINT_ORDER
00496
00502
#define U_COMPARE_CODE_POINT_ORDER 0x8000
00503
#endif
00504
00571
U_STABLE int32_t U_EXPORT2
00572
unorm_compare(
const UChar *s1, int32_t length1,
00573
const UChar *s2, int32_t length2,
00574 uint32_t options,
00575 UErrorCode *pErrorCode);
00576
00577
#endif
00578
00579
#endif