commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1157549 - /commons/proper/codec/branches/generics/src/java/org/apache/commons/codec/language/ColognePhonetic.java
Date Sun, 14 Aug 2011 15:33:13 GMT
Author: ggregory
Date: Sun Aug 14 15:33:13 2011
New Revision: 1157549

URL: http://svn.apache.org/viewvc?rev=1157549&view=rev
Log:
[CODEC-127] Non-ascii characters in source files

Modified:
    commons/proper/codec/branches/generics/src/java/org/apache/commons/codec/language/ColognePhonetic.java

Modified: commons/proper/codec/branches/generics/src/java/org/apache/commons/codec/language/ColognePhonetic.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/branches/generics/src/java/org/apache/commons/codec/language/ColognePhonetic.java?rev=1157549&r1=1157548&r2=1157549&view=diff
==============================================================================
--- commons/proper/codec/branches/generics/src/java/org/apache/commons/codec/language/ColognePhonetic.java
(original)
+++ commons/proper/codec/branches/generics/src/java/org/apache/commons/codec/language/ColognePhonetic.java
Sun Aug 14 15:33:13 2011
@@ -261,11 +261,20 @@ public class ColognePhonetic implements 
         }
     }
 
-    private static final char[][] PREPROCESS_MAP = new char[][]{
-        {'\u00C4', 'A'}, // capital a, umlaut mark
-        {'\u00DC', 'U'}, // capital u, umlaut mark
-        {'\u00D6', 'O'}, // capital o, umlaut mark
-        {'\u00DF', 'S'} // small sharp s, German
+    /**
+     * 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
+            { '\u00D6', 'O' }, // capital o, umlaut mark
+            { '\u00DF', 'S' } // small sharp s, German
     };
 
     /*
@@ -385,8 +394,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);



Mime
View raw message