summaryrefslogtreecommitdiff
path: root/Source/WebKit/mac/icu/unicode/unorm.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/mac/icu/unicode/unorm.h')
-rw-r--r--Source/WebKit/mac/icu/unicode/unorm.h38
1 files changed, 12 insertions, 26 deletions
diff --git a/Source/WebKit/mac/icu/unicode/unorm.h b/Source/WebKit/mac/icu/unicode/unorm.h
index 8bdbee7c6..fbb7b49b3 100644
--- a/Source/WebKit/mac/icu/unicode/unorm.h
+++ b/Source/WebKit/mac/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 @@
*
* <h2>Unicode normalization API</h2>
*
+ * 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().
+ *
* <code>unorm_normalize</code> transforms Unicode text into an equivalent composed or
* decomposed form, allowing for easier sorting and searching of text.
* <code>unorm_normalize</code> supports the standard normalization forms described in
* <a href="http://www.unicode.org/unicode/reports/tr15/" target="unicode">
- * Unicode Standard Annex #15 &#8212; Unicode Normalization Forms</a>.
+ * Unicode Standard Annex #15: Unicode Normalization Forms</a>.
*
* 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.