Is there a library that is able to parse Unicode domain name into IDNA? Like שלום.com ==> http://xn--9dbne9b.com/ ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
java.net.IDN seems to do the trick. From my Scala console:
Note that it works on the hostname, not the URL. So you’ll have to strip/extract the
http://protocol first.A quick glance at the documentation reveals it works in the opposite direction too. From above (my Unicode hostname in the variable
res0)