Top Description Inners Fields Constructors Methods
com.ibm.icu.text

public final Class Normalizer

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.nio.CharBuffer, java.text.CharacterIterator, com.ibm.icu.impl.Norm2AllModes, .Normalizer2Impl, .UCaseProps, com.ibm.icu.lang.UCharacter, com.ibm.icu.util.ICUCloneNotSupportedException

Old Unicode normalization API.

This API has been replaced by the Normalizer2 class and is only available for backward compatibility. This class simply delegates to the Normalizer2 class. There are two exceptions: The new API does not provide a replacement for QuickCheckResult and compare().

normalize transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text. normalize supports the standard normalization forms described in 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. In Unicode, this can be encoded as a single character (the "composed" form):

     00C1    LATIN CAPITAL LETTER A WITH ACUTE
or as two separate characters (the "decomposed" form):
     0041    LATIN CAPITAL LETTER A
     0301    COMBINING ACUTE ACCENT

To a user of your program, however, both of these sequences should be treated as the same "user-level" character "A with acute accent". When you are searching or comparing text, you must ensure that these two sequences are treated equivalently. In addition, you must handle characters with more than one accent. Sometimes the order of a character's combining accents is significant, while in other cases accent sequences in different orders are really equivalent.

Similarly, the string "ffi" can be encoded as three separate letters:

     0066    LATIN SMALL LETTER F
     0066    LATIN SMALL LETTER F
     0069    LATIN SMALL LETTER I
or as the single character
     FB03    LATIN SMALL LIGATURE FFI

The ffi ligature is not a distinct semantic character, and strictly speaking it shouldn't be in Unicode at all, but it was included for compatibility with existing character sets that already provided it. The Unicode standard identifies such characters by giving them "compatibility" decompositions into the corresponding semantic characters. When sorting and searching, you will often want to use these mappings.

normalize helps solve these problems by transforming text into the canonical composed and decomposed forms as shown in the first example above. In addition, you can have it perform compatibility decompositions so that you can treat compatibility characters the same as their equivalents. Finally, normalize rearranges accents into the proper canonical order, so that you do not have to worry about accent rearrangement on your own.

Form FCD, "Fast C or D", is also designed for collation. It allows to work on strings that are not necessarily normalized with an algorithm (like in collation) that works under "canonical closure", i.e., it treats precomposed characters and their decomposed equivalents the same.

It is not a normalization form because it does not provide for uniqueness of representation. Multiple strings may be canonically equivalent (their NFDs are identical) and may all conform to FCD without being identical themselves.

The form is defined such that the "raw decomposition", the recursive canonical decomposition of each character, results in a string that is canonically ordered. This means that precomposed characters are allowed for as long as their decompositions do not need canonical reordering.

Its advantage for a process like collation is that all NFD and most NFC texts - and many unnormalized texts - already conform to FCD and do not need to be normalized (NFD) for such a process. The FCD quick check will return YES for most strings in practice.

normalize(FCD) may be implemented with NFD.

For more details on FCD see Unicode Technical Note #5 (Canonical Equivalence in Applications): http://www.unicode.org/notes/tn5/#FCD

ICU collation performs either NFD or FCD normalization automatically if normalization is turned on for the collator object. Beyond collation and string search, normalized strings may be useful for string equivalence comparisons, transliteration/transcription, unique representations, etc.

The W3C generally recommends to exchange texts in NFC. Note also that most legacy character encodings use only precomposed forms and often do not encode any combining marks by themselves. For conversion to such character encodings the Unicode text needs to be normalized to NFC. For more usage examples, see the Unicode Standard Annex.

Note

The Normalizer class also provides API for iterative normalization. While the setIndex() and getIndex() refer to indices in the underlying Unicode input text, the next() and previous() methods iterate through characters in the normalized output. This means that there is not necessarily a one-to-one correspondence between characters returned by next() and previous() and the indices passed to and returned from setIndex() and getIndex(). It is for this reason that Normalizer does not implement the CharacterIterator interface.

ICU Status
Stable since ICU 2.8.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
Normalizer.CharsAppendable

An Appendable that writes into a char array with a capacity that may be less than array.length.

private static class
private static class
private static class
Normalizer.FCDMode

Deprecated as a consequence of Normalizer.Mode being deprecated.
private static class
public abstract static class
Normalizer.Mode

Deprecated ICU 56 Use Normalizer2 instead.
Constants for normalization modes.
private static class
private static class
private static class
Normalizer.NFCMode

Deprecated as a consequence of Normalizer.Mode being deprecated.
private static class
private static class
private static class
Normalizer.NFDMode

Deprecated as a consequence of Normalizer.Mode being deprecated.
private static class
private static class
private static class
Normalizer.NFKCMode

Deprecated as a consequence of Normalizer.Mode being deprecated.
private static class
private static class
private static class
Normalizer.NFKDMode

Deprecated as a consequence of Normalizer.Mode being deprecated.
private static class
private static class
Normalizer.NONEMode

Deprecated as a consequence of Normalizer.Mode being deprecated.
public static class
Normalizer.QuickCheckResult

Result values for quickCheck().

private static class

Field Summary

Modifier and TypeField and Description
private StringBuilder
private int
public static final int
COMPARE_CODE_POINT_ORDER

Option bit for compare: Compare strings in code point order instead of code unit order.

private static final int
COMPARE_EQUIV

Internal option for unorm_cmpEquivFold() for decomposing.

public static final int
COMPARE_IGNORE_CASE

Option bit for compare: Perform case-insensitive comparison.

public static final int
COMPARE_NORM_OPTIONS_SHIFT

Lowest-order bit number of compare() options bits corresponding to normalization options bits.

public static final Normalizer.Mode
COMPOSE

Canonical decomposition followed by canonical composition.

public static final Normalizer.Mode
COMPOSE_COMPAT

Compatibility decomposition followed by canonical composition.

private int
public static final Normalizer.Mode
DECOMP

Canonical decomposition.

public static final Normalizer.Mode
DECOMP_COMPAT

Compatibility decomposition.

public static final Normalizer.Mode
DEFAULT

Default normalization.

public static final int
DONE

Constant indicating that the end of the iteration has been reached.

public static final Normalizer.Mode
FCD

"Fast C or D" form.

public static final int
FOLD_CASE_DEFAULT

Option bit for compare: Case sensitively compare the strings

public static final int
FOLD_CASE_EXCLUDE_SPECIAL_I

Option value for case folding: Use the modified set of mappings provided in CaseFolding.txt to handle dotted I and dotless i appropriately for Turkic languages (tr, az).

public static final int
IGNORE_HANGUL

Option to disable Hangul/Jamo composition and decomposition.

public static final int
INPUT_IS_FCD

Option bit for compare: Both input strings are assumed to fulfill FCD conditions.

public static final Normalizer.QuickCheckResult
MAYBE

Indicates it cannot be determined if string is in the normalized format without further thorough checks.

private Normalizer.Mode
mode

Deprecated as a consequence of Normalizer.Mode being deprecated.
private int
public static final Normalizer.Mode
NFC

Canonical decomposition followed by canonical composition.

public static final Normalizer.Mode
NFD

Canonical decomposition.

public static final Normalizer.Mode
NFKC

Compatibility decomposition followed by canonical composition.

public static final Normalizer.Mode
NFKD

Compatibility decomposition.

public static final Normalizer.QuickCheckResult
NO

Indicates that string is not in the normalized format

public static final Normalizer.Mode
NO_OP

Null operation for use with the constructors and the static normalize method.

public static final Normalizer.Mode
NONE

No decomposition/composition.

private Normalizer2
private int
private UCharacterIterator
public static final int
UNICODE_3_2

Options bit set value to select Unicode 3.2 normalization (except NormalizationCorrections).

public static final Normalizer.QuickCheckResult
YES

Indicates that string is in the normalized format

Constructor Summary

AccessConstructor and Description
public
Normalizer(String
The string to be normalized. The normalization will start at the beginning of the string.
str
,
Normalizer.Mode
The normalization mode.
mode
,
int
Any optional features to be enabled. Currently the only available option is UNICODE_3_2. If you want the default behavior corresponding to one of the standard Unicode Normalization Forms, use 0 for this argument.
opt
)

Deprecated ICU 56 Use Normalizer2 instead.
Creates a new Normalizer object for iterating over the normalized form of a given string.
public
Normalizer(CharacterIterator
The input text to be normalized. The normalization will start at the beginning of the string.
iter
,
Normalizer.Mode
The normalization mode.
mode
,
int
Any optional features to be enabled. Currently the only available option is UNICODE_3_2. If you want the default behavior corresponding to one of the standard Unicode Normalization Forms, use 0 for this argument.
opt
)

Deprecated ICU 56 Use Normalizer2 instead.
Creates a new Normalizer object for iterating over the normalized form of the given text.
public
Normalizer(UCharacterIterator
The input text to be normalized. The normalization will start at the beginning of the string.
iter
,
Normalizer.Mode
The normalization mode.
mode
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Creates a new Normalizer object for iterating over the normalized form of the given text.

Method Summary

Modifier and TypeMethod and Description
private void
public Object
clone()

Overrides java.lang.Object.clone.

Deprecated ICU 56 Use Normalizer2 instead.
Clones this Normalizer object.
pack-priv static int
cmpEquivFold(CharSequence cs1, CharSequence cs2, int options)

public static int

Returns:

<0 or 0 or >0 as usual for string comparisons
compare
(char[]
First source character array.
s1
,
int
start index of source
s1Start
,
int
limit of the source
s1Limit
,
char[]
Second source character array.
s2
,
int
start index of the source
s2Start
,
int
limit of the source
s2Limit
,
int
A bit set of options: - FOLD_CASE_DEFAULT or 0 is used for default options: Case-sensitive comparison in code unit order, and the input strings are quick-checked for FCD. - INPUT_IS_FCD Set if the caller knows that both s1 and s2 fulfill the FCD conditions.If not set, the function will quickCheck for FCD and normalize if necessary. - COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order - COMPARE_IGNORE_CASE Set to compare strings case-insensitively using case folding, instead of case-sensitively. If set, then the following case folding options are used.
options
)

Compare two strings for canonical equivalence.

public static int

Returns:

<0 or 0 or >0 as usual for string comparisons
compare
(String
First source string.
s1
,
String
Second source string.
s2
,
int
A bit set of options: - FOLD_CASE_DEFAULT or 0 is used for default options: Case-sensitive comparison in code unit order, and the input strings are quick-checked for FCD. - INPUT_IS_FCD Set if the caller knows that both s1 and s2 fulfill the FCD conditions. If not set, the function will quickCheck for FCD and normalize if necessary. - COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order - COMPARE_IGNORE_CASE Set to compare strings case-insensitively using case folding, instead of case-sensitively. If set, then the following case folding options are used.
options
)

Compare two strings for canonical equivalence.

public static int

Returns:

<0 or 0 or >0 as usual for string comparisons
compare
(char[]
First source string.
s1
,
char[]
Second source string.
s2
,
int
A bit set of options: - FOLD_CASE_DEFAULT or 0 is used for default options: Case-sensitive comparison in code unit order, and the input strings are quick-checked for FCD. - INPUT_IS_FCD Set if the caller knows that both s1 and s2 fulfill the FCD conditions. If not set, the function will quickCheck for FCD and normalize if necessary. - COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order - COMPARE_IGNORE_CASE Set to compare strings case-insensitively using case folding, instead of case-sensitively. If set, then the following case folding options are used.
options
)

Compare two strings for canonical equivalence.

public static int
compare(int
the first code point to be checked against the
char32a
,
int
the second code point
char32b
,
int
A bit set of options
options
)

Convenience method that can have faster implementation by not allocating buffers.

public static int
compare(int
the first code point to be checked against
char32a
,
String
the second string
str2
,
int
A bit set of options
options
)

Convenience method that can have faster implementation by not allocating buffers.

public static String

Returns:

String The composed string
compose
(String
The string to compose.
str
,
boolean
If true the string will be composed according to NFKC rules and if false will be composed according to NFC rules.
compat
)

Deprecated ICU 56 Use Normalizer2 instead.
Compose a string.
public static String

Returns:

String The composed string
compose
(String
The string to compose.
str
,
boolean
If true the string will be composed according to NFKC rules and if false will be composed according to NFC rules.
compat
,
int
The only recognized option is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Compose a string.
public static int

Returns:

int The total buffer size needed;if greater than length of result, the output was truncated.
compose
(char[]
The char array to compose.
source
,
char[]
A char buffer to receive the normalized text.
target
,
boolean
If true the char array will be composed according to NFKC rules and if false will be composed according to NFC rules.
compat
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Compose a string.
public static int

Returns:

int The total buffer size needed;if greater than length of result, the output was truncated.
compose
(char[]
The char array to compose.
src
,
int
Start index of the source
srcStart
,
int
Limit index of the source
srcLimit
,
char[]
The char buffer to fill in
dest
,
int
Start index of the destination buffer
destStart
,
int
End index of the destination buffer
destLimit
,
boolean
If true the char array will be composed according to NFKC rules and if false will be composed according to NFC rules.
compat
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Compose a string.
public static int

Returns:

Length of output (number of chars) when successful or IndexOutOfBoundsException
concatenate
(char[]
Left source array, may be same as dest.
left
,
int
start in the left array.
leftStart
,
int
limit in the left array (==length)
leftLimit
,
char[]
Right source array.
right
,
int
start in the right array.
rightStart
,
int
limit in the right array (==length)
rightLimit
,
char[]
The output buffer; can be null if destStart==destLimit==0 for pure preflighting.
dest
,
int
start in the destination array
destStart
,
int
limit in the destination array (==length)
destLimit
,
Normalizer.Mode
The normalization mode.
mode
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Concatenate normalized strings, making sure that the result is normalized as well.
public static String

Returns:

result
concatenate
(char[]
Left source string.
left
,
char[]
Right source string.
right
,
Normalizer.Mode
The normalization mode.
mode
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Concatenate normalized strings, making sure that the result is normalized as well.
public static String

Returns:

result
concatenate
(String
Left source string.
left
,
String
Right source string.
right
,
Normalizer.Mode
The normalization mode.
mode
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Concatenate normalized strings, making sure that the result is normalized as well.
private static final Normalizer.CmpEquivLevel[]
public int

Returns:

The codepoint as an int
current
()

Deprecated ICU 56
Return the current character in the normalized text.
public static String

Returns:

String The decomposed string
decompose
(String
The string to decompose.
str
,
boolean
If true the string will be decomposed according to NFKD rules and if false will be decomposed according to NFD rules.
compat
)

Deprecated ICU 56 Use Normalizer2 instead.
Decompose a string.
public static String

Returns:

String The decomposed string
decompose
(String
The string to decompose.
str
,
boolean
If true the string will be decomposed according to NFKD rules and if false will be decomposed according to NFD rules.
compat
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Decompose a string.
public static int

Returns:

int The total buffer size needed;if greater than length of result,the output was truncated.
decompose
(char[]
The char array to decompose.
source
,
char[]
A char buffer to receive the normalized text.
target
,
boolean
If true the char array will be decomposed according to NFKD rules and if false will be decomposed according to NFD rules.
compat
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Decompose a string.
public static int

Returns:

int The total buffer size needed;if greater than length of result,the output was truncated.
decompose
(char[]
The char array to compose.
src
,
int
Start index of the source
srcStart
,
int
Limit index of the source
srcLimit
,
char[]
The char buffer to fill in
dest
,
int
Start index of the destination buffer
destStart
,
int
End index of the destination buffer
destLimit
,
boolean
If true the char array will be decomposed according to NFKD rules and if false will be decomposed according to NFD rules.
compat
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Decompose a string.
public int

Returns:

The current iteration position
endIndex
()

Deprecated ICU 56
Retrieve the index of the end of the input text.
public int

Returns:

The codepoint as an int
first
()

Deprecated ICU 56
Return the first character in the normalized text.
public int

Returns:

The codepoint as an int
getBeginIndex
()

Deprecated ICU 2.2. Use startIndex() instead.
Retrieve the index of the start of the input text.
private static final Normalizer2
getComposeNormalizer2(boolean compat, int options)

private static final Normalizer2
getDecomposeNormalizer2(boolean compat, int options)

public int

Returns:

The codepoint as an int
getEndIndex
()

Deprecated ICU 2.2. Use endIndex() instead.
Retrieve the index of the end of the input text.
public static int

Returns:

the length of the closure value; 0 if there is none
getFC_NFKC_Closure
(int
The code point whose closure value is to be retrieved
c
,
char[]
The char array to receive the closure value
dest
)

Deprecated ICU 56
Gets the FC_NFKC closure value.
public static String

Returns:

String representation of the closure value; "" if there is none
getFC_NFKC_Closure
(int
The code point whose closure value is to be retrieved
c
)

Deprecated ICU 56
Gets the FC_NFKC closure value.
public int

Returns:

The current iteration position
getIndex
()

Deprecated ICU 56
Retrieve the current iteration position in the input text that is being normalized.
public int

Returns:

the length
getLength
()

Deprecated ICU 56
Gets the length of underlying text storage
public Normalizer.Mode
getMode()

Deprecated ICU 56
Return the basic operation performed by this Normalizer
public int
getOption(int option)

Deprecated ICU 56
Determine whether an option is turned on or off.
public int
getText(char[]
the char buffer to fill the UTF-16 units. The length of the buffer should be equal to the length of the underlying text storage
fillIn
)

Deprecated ICU 56
Gets the underlying text storage
public String

Returns:

a copy of the text under iteration.
getText
()

Deprecated ICU 56
Returns the text under iteration as a string
private static int
public static boolean

Returns:

Boolean value indicating whether the source string is in the "mode" normalization form
isNormalized
(char[]
The input array of characters to be checked to see if it is normalized
src
,
int
The strart index in the source
start
,
int
The limit index in the source
limit
,
Normalizer.Mode
the normalization mode
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Test if a string is in a given normalization form.
public static boolean
isNormalized(String
the input string to be checked to see if it is normalized
str
,
Normalizer.Mode
the normalization mode
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Test if a string is in a given normalization form.
public static boolean
isNormalized(int
the input code point to be checked to see if it is normalized
char32
,
Normalizer.Mode
the normalization mode
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Convenience Method
public int

Returns:

The codepoint as an int
last
()

Deprecated ICU 56
Return the last character in the normalized text.
public int

Returns:

The codepoint as an int
next
()

Deprecated ICU 56
Return the next character in the normalized text and advance the iteration position by one.
private boolean
public static String

Returns:

String the normalized string
normalize
(String
the input string to be normalized.
str
,
Normalizer.Mode
the normalization mode
mode
,
int
the optional features to be enabled.
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Normalizes a String using the given normalization operation.
public static String

Returns:

the normalized string
normalize
(String
The string to normalize.
src
,
Normalizer.Mode
The normalization mode; one of Normalizer.NONE, Normalizer.NFD, Normalizer.NFC, Normalizer.NFKC, Normalizer.NFKD, Normalizer.DEFAULT
mode
)

Deprecated ICU 56 Use Normalizer2 instead.
Normalize a string.
public static int

Returns:

int The total buffer size needed;if greater than length of result, the output was truncated.
normalize
(char[]
The char array to normalize.
source
,
char[]
A char buffer to receive the normalized text.
target
,
Normalizer.Mode
The normalization mode; one of Normalizer.NONE, Normalizer.NFD, Normalizer.NFC, Normalizer.NFKC, Normalizer.NFKD, Normalizer.DEFAULT
mode
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Normalize a string.
public static int

Returns:

int The total buffer size needed;if greater than length of result, the output was truncated.
normalize
(char[]
The char array to compose.
src
,
int
Start index of the source
srcStart
,
int
Limit index of the source
srcLimit
,
char[]
The char buffer to fill in
dest
,
int
Start index of the destination buffer
destStart
,
int
End index of the destination buffer
destLimit
,
Normalizer.Mode
The normalization mode; one of Normalizer.NONE, Normalizer.NFD, Normalizer.NFC, Normalizer.NFKC, Normalizer.NFKD, Normalizer.DEFAULT
mode
,
int
The normalization options, ORed together (0 for no options).
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Normalize a string.
public static String

Returns:

String The normalized string
normalize
(int
The input string to be normalized.
char32
,
Normalizer.Mode
The normalization mode
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Normalize a codepoint according to the given mode
public static String

Returns:

String The normalized string
normalize
(int
The input string to be normalized.
char32
,
Normalizer.Mode
The normalization mode
mode
)

Deprecated ICU 56 Use Normalizer2 instead.
Convenience method to normalize a codepoint according to the given mode
public int

Returns:

The codepoint as an int
previous
()

Deprecated ICU 56
Return the previous character in the normalized text and decrement the iteration position by one.
private boolean
public static Normalizer.QuickCheckResult

Returns:

Return code to specify if the text is normalized or not (Normalizer.YES, Normalizer.NO or Normalizer.MAYBE)
quickCheck
(String
string for determining if it is in a normalized format
source
,
Normalizer.Mode
normalization format (Normalizer.NFC,Normalizer.NFD, Normalizer.NFKC,Normalizer.NFKD)
mode
)

Deprecated ICU 56 Use Normalizer2 instead.
Convenience method.
public static Normalizer.QuickCheckResult

Returns:

Return code to specify if the text is normalized or not (Normalizer.YES, Normalizer.NO or Normalizer.MAYBE)
quickCheck
(String
string for determining if it is in a normalized format
source
,
Normalizer.Mode
normalization format (Normalizer.NFC,Normalizer.NFD, Normalizer.NFKC,Normalizer.NFKD)
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Performing quick check on a string, to quickly determine if the string is in a particular normalization format.
public static Normalizer.QuickCheckResult

Returns:

Return code to specify if the text is normalized or not (Normalizer.YES, Normalizer.NO or Normalizer.MAYBE)
quickCheck
(char[]
Array of characters for determining if it is in a normalized format
source
,
Normalizer.Mode
normalization format (Normalizer.NFC,Normalizer.NFD, Normalizer.NFKC,Normalizer.NFKD)
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Convenience method.
public static Normalizer.QuickCheckResult

Returns:

Return code to specify if the text is normalized or not (Normalizer.YES, Normalizer.NO or Normalizer.MAYBE)
quickCheck
(char[]
string for determining if it is in a normalized format
source
,
int
the start index of the source
start
,
int
the limit index of the source it is equal to the length
limit
,
Normalizer.Mode
normalization format (Normalizer.NFC,Normalizer.NFD, Normalizer.NFKC,Normalizer.NFKD)
mode
,
int
Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2
options
)

Deprecated ICU 56 Use Normalizer2 instead.
Performing quick check on a string, to quickly determine if the string is in a particular normalization format.
public void
reset()

Deprecated ICU 56
Reset the index to the beginning of the text.
public int

Returns:

the first normalized character that is the result of iterating forward starting at the given index.
setIndex
(int
the desired index in the input text.
index
)

Deprecated ICU 3.2
Set the iteration position in the input text that is being normalized and return the first normalized character at that position.
public void
setIndexOnly(int
the desired index in the input text.
index
)

Deprecated ICU 56
Set the iteration position in the input text that is being normalized, without any immediate normalization.
public void
setMode(Normalizer.Mode
the new mode for this Normalizer. The supported modes are:
  • NFC - Unicode canonical decompositiion followed by canonical composition.
  • NFKC - Unicode compatibility decompositiion followed by canonical composition.
  • NFD - Unicode canonical decomposition
  • NFKD - Unicode compatibility decomposition.
  • NONE - Do nothing but return characters from the underlying input text.
newMode
)

Deprecated ICU 56
Set the normalization mode for this object.
public void
setOption(int
the option whose value is to be set.
option
,
boolean
the new setting for the option. Use true to turn the option on and false to turn it off.
value
)

Deprecated ICU 56
Set options that affect this Normalizer's operation.
public void
setText(StringBuffer
The new string to be normalized.
newText
)

Deprecated ICU 56
Set the input text over which this Normalizer will iterate.
public void
setText(char[]
The new string to be normalized.
newText
)

Deprecated ICU 56
Set the input text over which this Normalizer will iterate.
public void
setText(String
The new string to be normalized.
newText
)

Deprecated ICU 56
Set the input text over which this Normalizer will iterate.
public void
setText(CharacterIterator
The new string to be normalized.
newText
)

Deprecated ICU 56
Set the input text over which this Normalizer will iterate.
public void
setText(UCharacterIterator
The new string to be normalized.
newText
)

Deprecated ICU 56
Set the input text over which this Normalizer will iterate.
public int

Returns:

The current iteration position
startIndex
()

Deprecated ICU 56
Retrieve the index of the start of the input text.
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait