From: gu.martinm@gmail.com Date: Wed, 26 Mar 2014 19:13:01 +0000 (+0100) Subject: No time for comments X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=b9c0d53ed34d1b098b8335f28b05570899dda623;p=JavaForFun No time for comments --- diff --git a/Allgemeines/UNICODECollation/src/de/example/collation/CollationExample.java b/Allgemeines/UNICODECollation/src/de/example/collation/CollationExample.java index 1d728b1..40feeee 100644 --- a/Allgemeines/UNICODECollation/src/de/example/collation/CollationExample.java +++ b/Allgemeines/UNICODECollation/src/de/example/collation/CollationExample.java @@ -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);