-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.2_06
-
generic
-
generic
Name: skT45625 Date: 11/06/2000
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)
When you sort text, "nothing precedes everything". Ie. "man woman" precedes
"manic". This is currently not the case when using the Locale da_DK.
import java.text.Collator;
import java.util.Locale;
public class Sort
{
public static void main (String [] argv)
{
String s1 = "DANSKERE";
String s2 = "DANSK GRAMMATIK I PRAKSIS 1";
Collator coll = Collator.getInstance (new Locale("da","DK"));
coll.setStrength(Collator.IDENTICAL);
int res = coll.compare(s1, s2);
if (res == 0) {
System.out.println("[" + s1 + "] equals [" + s2 + "]");
}
if (res < 0) {
System.out.println("[" + s1 + "] is less than [" + s2 + "]");
}
if (res > 0) {
System.out.println("[" + s2 + "] is less than [" + s1 + "]");
}
}
}
(Review ID: 111879)
======================================================================