Java Data Type How to - Compare non english characters with accents


We would like to know how to compare non english characters with accents.


import java.text.Collator;
import java.util.Locale;
/*from w  w w  .j a v  a2  s.  c o  m*/
public class Main {

    public static void main(String[] args) {
        Collator collator = Collator.getInstance(Locale.FRENCH);

        if ("d?b?rqu?r", "debarquer") == 0) {
            System.out.println("Both Strings are equal");
        } else {
            System.out.println("Both Strings are not equal");