Package net.sf.saxon.codenorm
Class Normalizer
java.lang.Object
net.sf.saxon.codenorm.Normalizer
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.
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 invalid input: '&' Markus Scherer Modified to remove dependency on ICU code: Michael Kay
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteNormalization Form Selector(package private) static final byteMasks for the form selector(package private) static final byteMasks for the form selectorstatic final byteNormalization Form Selectorstatic final byteNormalization Form Selectorstatic final byteNormalization Form Selector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleangetExcluded(char ch) Just accessible for testing.(package private) StringgetRawDecompositionMapping(char ch) Just accessible for testing.normalize(CharSequence source) Normalizes text according to the chosen formnormalize(CharSequence source, StringBuffer target) Normalizes text according to the chosen form, replacing contents of the target buffer.
-
Field Details
-
COMPATIBILITY_MASK
static final byte COMPATIBILITY_MASKMasks for the form selector- See Also:
-
COMPOSITION_MASK
static final byte COMPOSITION_MASKMasks for the form selector- See Also:
-
D
public static final byte DNormalization Form Selector- See Also:
-
C
public static final byte CNormalization Form Selector- See Also:
-
KD
public static final byte KDNormalization Form Selector- See Also:
-
KC
public static final byte KCNormalization Form Selector- See Also:
-
-
Constructor Details
-
Normalizer
public Normalizer(byte form) Create a normalizer for a given form.
-
-
Method Details
-
normalize
Normalizes text according to the chosen form, replacing contents of the target buffer.- Parameters:
source- the original text, unnormalizedtarget- the resulting normalized text
-
normalize
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
Just accessible for testing.
-