import java.net.IDN;
public class ExempleIDN {
public static void main(String[] args) {
String url = "www.facebook.com";
String ascii = IDN.toASCII(url);
String unicode = IDN.toUnicode(url);
System.out.println("Entrée:"+ url);
System.out.println("Affichage Unicode (url):"+ unicode);
System.out.println("Affichage Ascii (url):"+ ascii);
}
}