mmriis / simpleidn

SimpleIDN ruby gem
MIT License
70 stars 14 forks source link

wrong convertation? #8

Closed taxxi closed 8 years ago

taxxi commented 8 years ago

Hello, the method SimpleIDN.to_ascii does not convert correct. The webside https://www.punycoder.com/ generates other results than this tool.

Example 1: the programm converts the word "verm├Âgensberater" into "xn--vermgensberater-k4a5139m", but the right conversion is "xn--vermgensberater-6jb1778m". Example 2: it converts "µö┐Õèí" into "xn--sba8drcua6b0370b", but the correct conversion should be "xn--8cakwd366ax69d". Example 3:it converts "ÒâåÒé╣Òâê" into "xn--mcaaa6dcp3ak4415f", but correct is "xn--2caaiqg7bcb4705f".

Best regards

mmriis commented 8 years ago

Thank you. I'm looking into this.

mmriis commented 8 years ago

It seems to be a case sensitivity thing, which is probably why it hasn't been discovered earlier as the main use is domains.

taxxi commented 8 years ago

Hi Morten, after my message i found out another fact.

The encoding is not unique. I found other conversions, which converted my words like your SimpleIDN-Tool, other converted like the website and another group had a complete new conversion...

Surprisingly all variantes are accepted by the most of all converters in the other direction - and your SimpleIDN-tool accepted every conversion.

Best regards

2016-03-03 13:38 GMT+01:00 Morten Møller Riis notifications@github.com:

It seems to be a case sensitivity thing, which is probably why it hasn't been discovered earlier as the main use is domains.

— Reply to this email directly or view it on GitHub https://github.com/mmriis/simpleidn/issues/8#issuecomment-191746446.