- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- Search for |

- File List
- Globals

# unorm.h

Go to the documentation of this file.

    00001 /*
    00002 *******************************************************************************
    00003 * Copyright (c) 1996-2007, 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
    00179 #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20
    00180
    00200 U_STABLE int32_t U_EXPORT2
    00201 unorm_normalize(const UChar *source, int32_t sourceLength,
    00202                 UNormalizationMode mode, int32_t options,
    00203                 UChar *result, int32_t resultLength,
    00204                 UErrorCode *status);
    00205 #endif
    00206
    00211 typedef enum UNormalizationCheckResult {
    00215   UNORM_NO,
    00219   UNORM_YES,
    00224   UNORM_MAYBE
    00225 } UNormalizationCheckResult;
    00226 #if !UCONFIG_NO_NORMALIZATION
    00227
    00247 U_STABLE UNormalizationCheckResult U_EXPORT2
    00248 unorm_quickCheck(const UChar *source, int32_t sourcelength,
    00249                  UNormalizationMode mode,
    00250                  UErrorCode *status);
    00251
    00268 U_STABLE UNormalizationCheckResult U_EXPORT2
    00269 unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
    00270                             UNormalizationMode mode, int32_t options,
    00271                             UErrorCode *pErrorCode);
    00272
    00294 U_STABLE UBool U_EXPORT2
    00295 unorm_isNormalized(const UChar *src, int32_t srcLength,
    00296                    UNormalizationMode mode,
    00297                    UErrorCode *pErrorCode);
    00298
    00316 U_STABLE UBool U_EXPORT2
    00317 unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
    00318                               UNormalizationMode mode, int32_t options,
    00319                               UErrorCode *pErrorCode);
    00320
    00394 U_STABLE int32_t U_EXPORT2
    00395 unorm_next(UCharIterator *src,
    00396            UChar *dest, int32_t destCapacity,
    00397            UNormalizationMode mode, int32_t options,
    00398            UBool doNormalize, UBool *pNeededToNormalize,
    00399            UErrorCode *pErrorCode);
    00400
    00427 U_STABLE int32_t U_EXPORT2
    00428 unorm_previous(UCharIterator *src,
    00429                UChar *dest, int32_t destCapacity,
    00430                UNormalizationMode mode, int32_t options,
    00431                UBool doNormalize, UBool *pNeededToNormalize,
    00432                UErrorCode *pErrorCode);
    00433
    00471 U_STABLE int32_t U_EXPORT2
    00472 unorm_concatenate(const UChar *left, int32_t leftLength,
    00473                   const UChar *right, int32_t rightLength,
    00474                   UChar *dest, int32_t destCapacity,
    00475                   UNormalizationMode mode, int32_t options,
    00476                   UErrorCode *pErrorCode);
    00477
    00483 #define UNORM_INPUT_IS_FCD          0x20000
    00484
    00490 #define U_COMPARE_IGNORE_CASE       0x10000
    00491
    00492 #ifndef U_COMPARE_CODE_POINT_ORDER
    00493 /* see also unistr.h and ustring.h */
    00499 #define U_COMPARE_CODE_POINT_ORDER  0x8000
    00500 #endif
    00501
    00568 U_STABLE int32_t U_EXPORT2
    00569 unorm_compare(const UChar *s1, int32_t length1,
    00570               const UChar *s2, int32_t length2,
    00571               uint32_t options,
    00572               UErrorCode *pErrorCode);
    00573
    00574 #endif /* #if !UCONFIG_NO_NORMALIZATION */
    00575
    00576 #endif