No time for comments
authorgu.martinm@gmail.com <gu.martinm@gmail.com>
Wed, 26 Mar 2014 19:13:01 +0000 (20:13 +0100)
committergu.martinm@gmail.com <gu.martinm@gmail.com>
Wed, 26 Mar 2014 19:13:01 +0000 (20:13 +0100)
Allgemeines/UNICODECollation/src/de/example/collation/CollationExample.java

index 1d728b1..40feeee 100644 (file)
@@ -19,7 +19,14 @@ public class CollationExample {
         final Collator es_ESCollator = Collator.getInstance(new Locale("es","ES"));
         final Collator fr_FRCollator = Collator.getInstance(Locale.FRANCE);
 
+        // String.compareTo and String.compareToIgnoreCase are using UNICODE
+        // values directly
+        //final String test = "GUS";
+        //test.compareToIgnoreCase("gus");
+
+        es_ESCollator.setStrength(Collator.TERTIARY);
         Collections.sort(wordsListES, es_ESCollator);
+        fr_FRCollator.setStrength(Collator.TERTIARY);
         Collections.sort(wordsListFR, fr_FRCollator);
 
         System.out.println("Words list ES: " + wordsListES);