X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..HEAD:/icu/unicode/unorm.h diff --git a/icu/unicode/unorm.h b/icu/unicode/unorm.h index 8bdbee7..fbb7b49 100644 --- a/icu/unicode/unorm.h +++ b/icu/unicode/unorm.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (c) 1996-2004, International Business Machines Corporation +* Copyright (c) 1996-2010, International Business Machines Corporation * and others. All Rights Reserved. ******************************************************************************* * File unorm.h @@ -20,6 +20,7 @@ #if !UCONFIG_NO_NORMALIZATION #include "unicode/uiter.h" +#include "unicode/unorm2.h" /** * \file @@ -27,11 +28,16 @@ * *

Unicode normalization API

* + * Note: This API has been replaced by the unorm2.h API and is only available + * for backward compatibility. The functions here simply delegate to the + * unorm2.h functions, for example unorm2_getInstance() and unorm2_normalize(). + * There is one exception: The new API does not provide a replacement for unorm_compare(). + * * unorm_normalize transforms Unicode text into an equivalent composed or * decomposed form, allowing for easier sorting and searching of text. * unorm_normalize supports the standard normalization forms described in * - * Unicode Standard Annex #15 — Unicode Normalization Forms. + * Unicode Standard Annex #15: Unicode Normalization Forms. * * Characters with accents or other adornments can be encoded in * several different ways in Unicode. For example, take the character A-acute. @@ -106,7 +112,7 @@ * unorm_normalize(UNORM_FCD) may be implemented with UNORM_NFD. * * For more details on FCD see the collation design document: - * http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/collation/ICU_collation_design.htm + * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm * * ICU collation performs either NFD or FCD normalization automatically if normalization * is turned on for the collator object. @@ -182,6 +188,7 @@ enum { * Normalize a string. * The string will be normalized according the specified normalization mode * and options. + * The source and result buffers must not be the same, nor overlap. * * @param source The string to normalize. * @param sourceLength The length of source, or -1 if NUL-terminated. @@ -201,28 +208,7 @@ unorm_normalize(const UChar *source, int32_t sourceLength, UNormalizationMode mode, int32_t options, UChar *result, int32_t resultLength, UErrorCode *status); -#endif -/** - * Result values for unorm_quickCheck(). - * For details see Unicode Technical Report 15. - * @stable ICU 2.0 - */ -typedef enum UNormalizationCheckResult { - /** - * Indicates that string is not in the normalized format - */ - UNORM_NO, - /** - * Indicates that string is in the normalized format - */ - UNORM_YES, - /** - * Indicates that string cannot be determined if it is in the normalized - * format without further thorough checks. - */ - UNORM_MAYBE -} UNormalizationCheckResult; -#if !UCONFIG_NO_NORMALIZATION + /** * Performing quick check on a string, to quickly determine if the string is * in a particular normalization format. @@ -451,7 +437,7 @@ unorm_previous(UCharIterator *src, * * @param left Left source string, may be same as dest. * @param leftLength Length of left source string, or -1 if NUL-terminated. - * @param right Right source string. + * @param right Right source string. Must not be the same as dest, nor overlap. * @param rightLength Length of right source string, or -1 if NUL-terminated. * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting. * @param destCapacity The number of UChars that fit into dest.