I created an URL validator for my JSF webpage and now stumbled across a problem with domains where the first word (separated by dot) contains a non ASCII character.
I have following valid website url http://testä.com
. Converting it to puny code using IDN.toASCII()
creates invalid url: xn--http://test-v8a.com
.
Should it not be http://xn--test-ooa.com/
I also checked it at german de
domain manager DENIC which shows same invalid URL results.
https://www.denic.de/service/tools/idn-web-converter/
Is this a BUG in Java/RFC or am I missing something.
Workaround
When i remove the protocol at first it works.