[issue21103] Encoding str to IDNA with ellipsis decomposes to empty labels

2014-03-30 Thread R. David Murray
R. David Murray added the comment: For whatever it is worth, it looks like rfc 5892 marks U+2026 as disallowed. -- nosy: +r.david.murray ___ Python tracker ___ __

[issue21103] Encoding str to IDNA with ellipsis decomposes to empty labels

2014-03-30 Thread Martin v . Löwis
Martin v. Löwis added the comment: I believe this behavior is correct wrt. RFC 3490. In the input, the last label is "c…", which is not empty. It is passed to ToASCII, which normalizes the ellipsis to "...". If UseSTD3ASCIIRules was true, conversion would fail as it yields "." (\x2E). However,

[issue21103] Encoding str to IDNA with ellipsis decomposes to empty labels

2014-03-30 Thread Christopher Foo
New submission from Christopher Foo: When encoding a string with the IDNA codec I expected that it will always raise an exception with empty labels. When I do this >>> 'example.c…'.encode('idna').decode('ascii') it returns 'example.c...' instead of raising UnicodeError. The original