-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.1
-
x86
-
windows_2000
Name: pa48320 Date: 07/28/2003
[ Steps ]
1. Change locale to Simplified Chinese
On Windows 2000: In Regional Setting, change default locale to Chinese(China) and reboot
On Solairs; set LANG to zh
2. Compile and run the testcase
Expected sorting order: \u5927, \u5220, \u4fee
Actual sorting order: \u5220, \u4fee, \u5927
[ Test Case ]
import java.util.*;
import java.text.*;
public class MySort {
static public void main(String[] args) {
String []myList={"\u5220","\u5927","\u4fee"};
String tmpString = new String();
Collator myCollator = Collator.getInstance(Locale.CHINA);
for (int i=0;i<(myList.length-1);i++)
{
if( myCollator.compare(myList[i], myList[i+1]) > 0 )
{
tmpString = myList[i+1];
myList[i+1] = myList[i];
myList[i] = tmpString;
}
}
for (int i=0;i<myList.length;i++)
System.out.println(myList[i]);
}
}
[ Other Info ]
Reproduced with jdk1.4.1_01, jdk1.4.1_02-b04 (currently used by Oracle)
Not reproduced with jdk1.3.1, jdk1.4.2, jdk1.5 build 10
(Incident Review ID: 192601)
======================================================================