In my rails app, i convert a idn url to punycode and back to idn.
But if i have a url like this http://日本語.jp (without www.)
domain = "http://日本語.jp"
punycode = Idna.toAscii(domain) => http://xn--blagzdfd.com
but trying to convert it backto IDN fails
idn = Idna.toUnicode(punycode) => xn--blagzdfd.com instead of http://日本語.jp
the toUnicode converts back properly if we just add www. to the above idn url like http://www.日本語.jp
am i missing something??