the ruby idna.toUnicode fun, is not converting the punycode in the tld part
i use the Idna.toAscii fun to convert a site name w开发者_如何转开发ww.中国.中国(the tld is also has unicode chars).
the result was www.xn--fiqs8s.xn--fiqs8s
I used the Idna.toUnicode fun to convert the above punycode back to the unicode characters.
but i got only www.中国.xn--fiqs8s The toUnicode fun is ignoring the tld part.
Is there any way to over come this?
IDN::Idna.toUnicode("www.xn--fiqs8s.xn--fiqs8s")
produces "www.中国.中国" for me.
I have version 0.0.2 of the ruby idn gem and version 1.19 of LibIDN, do you perhaps need to update one of these?
精彩评论