|
The Normalizer classIntroductionNormalization is a process that involves transforming characters and sequences of characters into a formally-defined underlying representation. This process is most important when text needs to be compared for sorting and searching, but it is also used when storing text to ensure that the text is stored in a consistent representation. The Unicode Consortium has defined a number of normalization forms reflecting the various needs of applications:
Class synopsis
Normalizer
/* Constants */
public
const
int
Normalizer::FORM_D;
public
const
int
Normalizer::NFD;
public
const
int
Normalizer::FORM_KD;
public
const
int
Normalizer::NFKD;
public
const
int
Normalizer::FORM_C;
public
const
int
Normalizer::NFC;
public
const
int
Normalizer::FORM_KC;
public
const
int
Normalizer::NFKC;
public
const
int
Normalizer::FORM_KC_CF;
public
const
int
Normalizer::NFKC_CF;
/* Methods */
public static stringnull getRawDecomposition(string
$string , int $form = Normalizer::FORM_C)public static bool isNormalized(string
$string , int $form = Normalizer::FORM_C)public static stringfalse normalize(string
$string , int $form = Normalizer::FORM_C)Predefined ConstantsThe following constants define the normalization form used by the normalizer:
See Also
Changelog
|