commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1157597 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
Date Sun, 14 Aug 2011 18:58:55 GMT
Author: sebb
Date: Sun Aug 14 18:58:54 2011
New Revision: 1157597

URL: http://svn.apache.org/viewvc?rev=1157597&view=rev
Log:
CODEC-127 - fix mangled characters

Modified:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java?rev=1157597&r1=1157596&r2=1157597&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
Sun Aug 14 18:58:54 2011
@@ -364,15 +364,16 @@ public class SoundexTest extends StringE
     @Test
     public void testUsMappingEWithAcute() {
         Assert.assertEquals("E000", this.getSoundexEncoder().encode("e"));
-        if (Character.isLetter('�')) {
+        if (Character.isLetter('\u00e9')) { // e-acute
             try {
-                Assert.assertEquals("�000", this.getSoundexEncoder().encode("�"));
+                //         uppercase E-acute
+                Assert.assertEquals("\u00c9000", this.getSoundexEncoder().encode("\u00e9"));
                 Assert.fail("Expected IllegalArgumentException not thrown");
             } catch (IllegalArgumentException e) {
                 // expected
             }
         } else {
-            Assert.assertEquals("", this.getSoundexEncoder().encode("�"));
+            Assert.assertEquals("", this.getSoundexEncoder().encode("\u00e9"));
         }
     }
 
@@ -384,15 +385,16 @@ public class SoundexTest extends StringE
     @Test
     public void testUsMappingOWithDiaeresis() {
         Assert.assertEquals("O000", this.getSoundexEncoder().encode("o"));
-        if (Character.isLetter('�')) {
+        if (Character.isLetter('\u00f6')) { // o-umlaut
             try {
-                Assert.assertEquals("�000", this.getSoundexEncoder().encode("�"));
+                //         uppercase O-umlaut
+                Assert.assertEquals("\u00d6000", this.getSoundexEncoder().encode("\u00f6"));
                 Assert.fail("Expected IllegalArgumentException not thrown");
             } catch (IllegalArgumentException e) {
                 // expected
             }
         } else {
-            Assert.assertEquals("", this.getSoundexEncoder().encode("�"));
+            Assert.assertEquals("", this.getSoundexEncoder().encode("\u00f6"));
         }
     }
 }



Mime
View raw message