Package net.sf.saxon.codenorm
Class Normalizer
- java.lang.Object
-
- net.sf.saxon.codenorm.Normalizer
-
public class Normalizer extends java.lang.Object
Implements Unicode Normalization Forms C, D, KC, KD. Copyright (c) 1991-2005 Unicode, Inc. For terms of use, see http://www.unicode.org/terms_of_use.html For documentation, see UAX#15.
The Unicode Consortium makes no expressed or implied warranty of any kind, and assumes no liability for errors or omissions. No liability is assumed for incidental and consequential damages in connection with or arising out of the use of the information here.- Author:
- Mark Davis Updates for supplementary code points: Vladimir Weinstein & Markus Scherer Modified to remove dependency on ICU code: Michael Kay
-
-
Field Summary
Fields Modifier and Type Field Description static byte
C
Normalization Form Selector(package private) static byte
COMPATIBILITY_MASK
Masks for the form selector(package private) static byte
COMPOSITION_MASK
Masks for the form selectorstatic byte
D
Normalization Form Selectorstatic byte
KC
Normalization Form Selectorstatic byte
KD
Normalization Form Selector
-
Constructor Summary
Constructors Constructor Description Normalizer(byte form)
Create a normalizer for a given form.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
getExcluded(char ch)
Just accessible for testing.(package private) java.lang.String
getRawDecompositionMapping(char ch)
Just accessible for testing.java.lang.CharSequence
normalize(java.lang.CharSequence source)
Normalizes text according to the chosen formjava.lang.StringBuffer
normalize(java.lang.CharSequence source, java.lang.StringBuffer target)
Normalizes text according to the chosen form, replacing contents of the target buffer.
-
-
-
Field Detail
-
COMPATIBILITY_MASK
static final byte COMPATIBILITY_MASK
Masks for the form selector- See Also:
- Constant Field Values
-
COMPOSITION_MASK
static final byte COMPOSITION_MASK
Masks for the form selector- See Also:
- Constant Field Values
-
D
public static final byte D
Normalization Form Selector- See Also:
- Constant Field Values
-
C
public static final byte C
Normalization Form Selector- See Also:
- Constant Field Values
-
KD
public static final byte KD
Normalization Form Selector- See Also:
- Constant Field Values
-
KC
public static final byte KC
Normalization Form Selector- See Also:
- Constant Field Values
-
-
Method Detail
-
normalize
public java.lang.StringBuffer normalize(java.lang.CharSequence source, java.lang.StringBuffer target)
Normalizes text according to the chosen form, replacing contents of the target buffer.- Parameters:
source
- the original text, unnormalizedtarget
- the resulting normalized text
-
normalize
public java.lang.CharSequence normalize(java.lang.CharSequence source)
Normalizes text according to the chosen form- Parameters:
source
- the original text, unnormalized- Returns:
- target the resulting normalized text
-
getExcluded
boolean getExcluded(char ch)
Just accessible for testing.
-
getRawDecompositionMapping
java.lang.String getRawDecompositionMapping(char ch)
Just accessible for testing.
-
-