View Javadoc

1   package cz.cuni.amis.utils.normalizer;
2   
3   import java.text.Normalizer;
4   
5   public class NormalizerAscii {
6   
7   	public static String toAscii(String str) {
8   		if (str == null) return null;
9   		return Normalizer.normalize(str, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]","_");
10  	}
11  	
12  	public static String stripQuotes(String str) {
13  		return str.replaceAll("\\\"", "'");
14  	}
15  	
16  }