Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

unorm.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 * Copyright (c) 1996-2001, 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 #include "unicode/uiter.h"
00020 
00124 typedef enum {
00126   UNORM_NONE = 1, 
00128   UNORM_NFD = 2,
00130   UNORM_NFKD = 3,
00132   UNORM_NFC = 4,
00134   UNORM_DEFAULT = UNORM_NFC, 
00136   UNORM_NFKC =5,
00138   UNORM_FCD = 6,
00139 
00141   UNORM_MODE_COUNT,
00142 
00143   /* *** The rest of this enum is entirely deprecated. *** */
00144 
00149   UCOL_NO_NORMALIZATION = 1,
00154   UCOL_DECOMP_CAN = 2,
00159   UCOL_DECOMP_COMPAT = 3,
00164   UCOL_DEFAULT_NORMALIZATION = UCOL_DECOMP_COMPAT, 
00169   UCOL_DECOMP_CAN_COMP_COMPAT = 4,
00174   UCOL_DECOMP_COMPAT_COMP_CAN =5,
00175 
00180   UCOL_IGNORE_HANGUL    = 16,
00185   UNORM_IGNORE_HANGUL    = 16
00186 } UNormalizationMode;
00187 
00207 U_CAPI int32_t U_EXPORT2 
00208 unorm_normalize(const UChar *source, int32_t sourceLength,
00209                 UNormalizationMode mode, int32_t options,
00210                 UChar *result, int32_t resultLength,
00211                 UErrorCode *status);
00212 
00218 #define u_normalize unorm_normalize
00219 
00225 typedef enum UNormalizationCheckResult {
00229   UNORM_NO,
00233   UNORM_YES,
00238   UNORM_MAYBE
00239 } UNormalizationCheckResult;
00240 
00261 U_CAPI UNormalizationCheckResult U_EXPORT2
00262 unorm_quickCheck(const UChar *source, int32_t sourcelength,
00263                  UNormalizationMode mode,
00264                  UErrorCode *status);
00265 
00287 U_CAPI UBool U_EXPORT2
00288 unorm_isNormalized(const UChar *src, int32_t srcLength,
00289                    UNormalizationMode mode,
00290                    UErrorCode *pErrorCode);
00291 
00365 U_CAPI int32_t U_EXPORT2
00366 unorm_next(UCharIterator *src,
00367            UChar *dest, int32_t destCapacity,
00368            UNormalizationMode mode, int32_t options,
00369            UBool doNormalize, UBool *pNeededToNormalize,
00370            UErrorCode *pErrorCode);
00371 
00398 U_CAPI int32_t U_EXPORT2
00399 unorm_previous(UCharIterator *src,
00400                UChar *dest, int32_t destCapacity,
00401                UNormalizationMode mode, int32_t options,
00402                UBool doNormalize, UBool *pNeededToNormalize,
00403                UErrorCode *pErrorCode);
00404 
00442 U_CAPI int32_t U_EXPORT2
00443 unorm_concatenate(const UChar *left, int32_t leftLength,
00444                   const UChar *right, int32_t rightLength,
00445                   UChar *dest, int32_t destCapacity,
00446                   UNormalizationMode mode, int32_t options,
00447                   UErrorCode *pErrorCode);
00448 
00454 #define UNORM_INPUT_IS_FCD          0x20000
00455 
00461 #define U_COMPARE_IGNORE_CASE       0x10000
00462 
00463 #ifndef U_COMPARE_CODE_POINT_ORDER
00464 /* see also unistr.h and ustring.h */
00470 #define U_COMPARE_CODE_POINT_ORDER  0x8000
00471 #endif
00472 
00537 U_CAPI int32_t U_EXPORT2
00538 unorm_compare(const UChar *s1, int32_t length1,
00539               const UChar *s2, int32_t length2,
00540               uint32_t options,
00541               UErrorCode *pErrorCode);
00542 
00543 #endif

Generated on Thu Aug 15 14:13:33 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001