// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.text.Collator;
import java.util.Locale;

public class Compare {
    private static void test(Locale loc, int strength) {
        System.out.println(Collator.getInstance(loc).compare("ss", "\u00DF") + " " + Collator.getInstance(loc).compare("ss".toUpperCase(), "\u00DF".toUpperCase()));
    }
    public static void main(String[] args) {
        Locale[] loc = { Locale.ENGLISH, Locale.GERMAN };
        int[] strength = { Collator.PRIMARY, Collator.SECONDARY, Collator.TERTIARY };
        for(Locale loc1 : loc) {
            for(int strength1 : strength) {
                test(loc1, strength1);
            }
        }
    }
}
