Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

unorm.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 * Copyright (c) 1996-2003, 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 
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 
00154 enum {
00161     UNORM_UNICODE_3_2=0x20
00162 };
00163 
00182 U_CAPI int32_t U_EXPORT2 
00183 unorm_normalize(const UChar *source, int32_t sourceLength,
00184                 UNormalizationMode mode, int32_t options,
00185                 UChar *result, int32_t resultLength,
00186                 UErrorCode *status);
00187 
00193 typedef enum UNormalizationCheckResult {
00197   UNORM_NO,
00201   UNORM_YES,
00206   UNORM_MAYBE
00207 } UNormalizationCheckResult;
00208 
00229 U_CAPI UNormalizationCheckResult U_EXPORT2
00230 unorm_quickCheck(const UChar *source, int32_t sourcelength,
00231                  UNormalizationMode mode,
00232                  UErrorCode *status);
00233 
00250 U_CAPI UNormalizationCheckResult U_EXPORT2
00251 unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength, 
00252                             UNormalizationMode mode, int32_t options,
00253                             UErrorCode *pErrorCode);
00254 
00276 U_CAPI UBool U_EXPORT2
00277 unorm_isNormalized(const UChar *src, int32_t srcLength,
00278                    UNormalizationMode mode,
00279                    UErrorCode *pErrorCode);
00280 
00298 U_CAPI UBool U_EXPORT2
00299 unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
00300                               UNormalizationMode mode, int32_t options,
00301                               UErrorCode *pErrorCode);
00302 
00376 U_CAPI int32_t U_EXPORT2
00377 unorm_next(UCharIterator *src,
00378            UChar *dest, int32_t destCapacity,
00379            UNormalizationMode mode, int32_t options,
00380            UBool doNormalize, UBool *pNeededToNormalize,
00381            UErrorCode *pErrorCode);
00382 
00409 U_CAPI int32_t U_EXPORT2
00410 unorm_previous(UCharIterator *src,
00411                UChar *dest, int32_t destCapacity,
00412                UNormalizationMode mode, int32_t options,
00413                UBool doNormalize, UBool *pNeededToNormalize,
00414                UErrorCode *pErrorCode);
00415 
00453 U_CAPI int32_t U_EXPORT2
00454 unorm_concatenate(const UChar *left, int32_t leftLength,
00455                   const UChar *right, int32_t rightLength,
00456                   UChar *dest, int32_t destCapacity,
00457                   UNormalizationMode mode, int32_t options,
00458                   UErrorCode *pErrorCode);
00459 
00465 #define UNORM_INPUT_IS_FCD          0x20000
00466 
00472 #define U_COMPARE_IGNORE_CASE       0x10000
00473 
00474 #ifndef U_COMPARE_CODE_POINT_ORDER
00475 /* see also unistr.h and ustring.h */
00481 #define U_COMPARE_CODE_POINT_ORDER  0x8000
00482 #endif
00483 
00499 #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20
00500 
00567 U_CAPI int32_t U_EXPORT2
00568 unorm_compare(const UChar *s1, int32_t length1,
00569               const UChar *s2, int32_t length2,
00570               uint32_t options,
00571               UErrorCode *pErrorCode);
00572 
00573 #endif /* #if !UCONFIG_NO_NORMALIZATION */
00574 
00575 #endif

Generated on Wed Sep 3 17:47:10 2003 for ICU 2.6 by doxygen 1.3.2