-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDNA encoding/decoding issue #46
Comments
On Nov 29, 2013, at 6:33, bastiak notifications@github.com wrote:
I think we need to call something like _escapify after calling encodings.idna.ToUnicode(), but I'm not quite sure what that something is. Clearly "." (and perhaps unicode equivalents to ".") need to be escaped, and escaping space seems sensible, but on the other hand just calling _escapify() is bad because it ends up escaping unicode code points > 127, which seems bad. I don't know enough about Unicode to know if other whitespace-like things need escaping, if there are any. I will ponder this further, but anyone who knows Unicode well is encouraged to help :) /Bob |
Sorry for late answer, I was busy. In my opinion, in encodings.idna.ToUnicode(value) value should be "de-escapified" string. I'm not sure, but in my opinion the dns.name.to_unicode() method should provide only human readable form of the domain name without any escaping. |
Hi, dns.name.from_unicode() should remove any escaping and make a pure unicode string per label, then encode labels with encodings.idna.ToASCII() (labels are stored in punycoded notation without escaping) dns.name.Name.to_unicode() should convert labels with encodings.idna.ToUnicode() and then escape characters per label dns.name.Name.to_text() should only escape some required characters per label I haven't inspected to_wire() and from_wire() yet. I would like to make a patch. |
On Mar 28, 2014, at 6:44, bastiak notifications@github.com wrote:
/Bob |
but spaces are not allowed in domain names ... |
Hello,
I have trouble with decoding punycoded IDN domain back to Unicode, here is example (python 2.7):
But when I use standard library, it works:
When I substitute space with \032, it works with encoding module, but it is giving me different punycoded value:
The text was updated successfully, but these errors were encountered: