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 string ends with U+2026 
HORIZONTAL ELLIPSIS if you can't see it clearly. These strings are coming from 
web pages in a web crawler.

I tested this on Python 3.4, 3.3.2, 2.7.5, 2.6.9.

----------
components: Library (Lib)
messages: 215189
nosy: chfoo
priority: normal
severity: normal
status: open
title: Encoding str to IDNA with ellipsis decomposes to empty labels
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21103>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to