info.magnolia.cms.util
Class UnicodeNormalizer

java.lang.Object
  extended by info.magnolia.cms.util.UnicodeNormalizer

public class UnicodeNormalizer
extends java.lang.Object

A wrapper around java.text.Normalizer and com.ibm.icu.text.Normalizer; uses the former if present, or none if none is present. note: if not running under Java >=6, and without ICU, this does nothing. If needed, one can use their own implementation, by setting the info.magnolia.cms.util.UnicodeNormalizer$Normalizer system property.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph
See Also:
Normalizer, com.ibm.icu.text.Normalizer, http://www.icu-project.org/ to get the ICU4J library., http://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms for more information.

Nested Class Summary
static class UnicodeNormalizer.AutoDetectNormalizer
          Tries to load the normalizer dynamically and respects the property SystemProperty.MAGNOLIA_UTF8_ENABLED.
static class UnicodeNormalizer.ICUNormalizer
          Uses com.ibm.icu.text.Normalizer to normalize the string.
static class UnicodeNormalizer.Java6ReflectionNormalizer
          This uses reflection, since we're still compiling with Java 5.
static class UnicodeNormalizer.NonNormalizer
          Returns the original value unchanged.
static interface UnicodeNormalizer.Normalizer
          Used to normalize a String.
 
Constructor Summary
UnicodeNormalizer()
           
 
Method Summary
static java.lang.String normalizeNFC(java.lang.String in)
          Normalizes the given String to the NFC form.
static java.lang.String[] normalizeNFC(java.lang.String[] values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicodeNormalizer

public UnicodeNormalizer()
Method Detail

normalizeNFC

public static java.lang.String[] normalizeNFC(java.lang.String[] values)

normalizeNFC

public static java.lang.String normalizeNFC(java.lang.String in)
Normalizes the given String to the NFC form.



Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.