Antoine Pitrou <pit...@free.fr> added the comment: Sorry, the email gateway of Roundup ate half of my snippets. Here they are again:
>>> zlib.compress(u"ha") 'x\x9c\xcbH\x04\x00\x013\x00\xca' >>> zlib.compress(u"hà") Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 1: ordinal not in range(128) >>> pwd.getpwnam(u"root") pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash') >>> pwd.getpwnam(u"rooté") Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1712522> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com