import java.text.Collator;
import java.util.Locale;
public class Test {
    public static void main(String... args) {
        Collator collator = Collator.getInstance(Locale.ROOT);
        collator.setStrength(Collator.PRIMARY);
        System.out.println("With Collator.PRIMARY, Locale.ROOT");
        System.out.println("'O' and 'o' are considered " +
                (collator.compare("O", "o") == 0 ? "the same" : "different"));
        System.out.println("'Ö' and 'ö' are considered " +
                (collator.compare("Ö", "ö") == 0 ? "the same" : "different"));
        System.out.println("'\u00D8' and '\u00F8' are considered " +
                (collator.compare("\u00D8", "\u00F8") == 0 ? "the same" : "different"));
    }
} 