@@ -0,0 +1,909 @@
+package ca.six.demo.lib;%0A%0Aimport java.text.Collator;%0Aimport java.text.RuleBasedCollator;%0Aimport java.util.Arrays;%0Aimport java.util.Collections;%0Aimport java.util.Comparator;%0Aimport java.util.List;%0Aimport java.util.Locale;%0A%0Apublic class ChineseSort %7B%0A    public static void main(String%5B%5D args) %7B%0A        List%3CString%3E names = Arrays.asList(%22%E7%AC%AC%E4%B8%80%22, %22%E6%97%A0%E5%8F%8C%22, %22%E8%8B%B9%E6%9E%9C%22);%0A        Collections.sort(names, (n1, n2) -%3E n1.compareTo(n2));%0A        names.forEach(System.out::println); // %E6%97%A0%E5%8F%8C, %E7%AC%AC%E4%B8%80, %E8%8B%B9%E6%9E%9C%0A%0A        List%3CString%3E names2 = Arrays.asList(%22%E7%AC%AC%E4%B8%80%22, %22%E6%97%A0%E5%8F%8C%22, %22%E8%8B%B9%E6%9E%9C%22, %22%E5%95%8A%22, %22%E4%B8%8D%22);%0A        Collections.sort(names2, new CN());%0A        names2.forEach(System.out::println); // %E5%95%8A, %E4%B8%8D, %E7%AC%AC%E4%B8%80, %E8%8B%B9%E6%9E%9C, %E6%97%A0%E5%8F%8C,%0A    %7D%0A%7D%0A%0Aclass CN implements Comparator%3CString%3E%7B%0A    RuleBasedCollator collator = (RuleBasedCollator)Collator.getInstance(Locale.CHINA);%0A%0A    @Override%0A    public int compare(String o1, String o2) %7B%0A        return collator.compare(o1, o2);%0A    %7D%0A%7D%0A

order by Chinese pinyin