Skip to content

Instantly share code, notes, and snippets.

@jabbrwcky
jabbrwcky / StringCleaner.java
Created March 19, 2012 13:16
StringCleaner: a demonstration how to use ICU4j to convert practically any UTF-8/Java String to some ASCII compatible form. Requires ICU4J, TestNG and Findbugs-Annotations.
package net.hausherr.util;
import com.ibm.icu.text.Normalizer;
import java.util.HashMap;
import java.util.Map;
/**
* StringCleaner provides a method for normalizing a string to generally
* ASCII-compatible form.