Author: ggregory Date: Sun Aug 14 15:34:08 2011 New Revision: 1157550 URL: http://svn.apache.org/viewvc?rev=1157550&view=rev Log: [CODEC-127] Non-ascii characters in source files
Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java?rev=1157550&r1=1157549&r2=1157550&view=diff ============================================================================== --- commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java (original) +++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java Sun Aug 14 15:34:08 2011 @@ -262,6 +262,15 @@ public class ColognePhonetic implements } } + /** + * Maps some Germanic characters to plain for internal processing. The following characters are mapped: + * <ul> + * <li>capital a, umlaut mark</li> + * <li>capital u, umlaut mark</li> + * <li>capital o, umlaut mark</li> + * <li>small sharp s, German</li> + * </ul> + */ private static final char[][] PREPROCESS_MAP = new char[][]{ {'\u00C4', 'A'}, // capital a, umlaut mark {'\u00DC', 'U'}, // capital u, umlaut mark @@ -397,8 +406,8 @@ public class ColognePhonetic implements return colognePhonetic(text1).equals(colognePhonetic(text2)); } - /* - * Converts the string to upper case and replaces germanic umlauts, and the ââ¬Åßââ¬ï¿½. + /** + * Converts the string to upper case and replaces germanic characters as defined in {@link #PREPROCESS_MAP}. */ private String preprocess(String text) { text = text.toUpperCase(Locale.GERMAN);