Marc-Andre Lemburg <m...@egenix.com> added the comment: flox wrote: > > flox <la...@yahoo.fr> added the comment: > >> Are you sure that this patch is correct (which RFC says >> that quoted printable should use our raw-unicode-escape >> codec ?): > > I am not sure of anything. It is an "educated guess" at the most. > Since 'base64' and 'x-uuencode' both use 'raw-unicode-escape'...
Quoted printable as well as the other two transfer encodings should be encodings that "fit" into the 7-bit ASCII default originally assumed for email messages, so 'ascii' appears to be the more natural choice. The choice of 'raw-unicode-escape' will cause strange error messages or hide errors, since it encodes non-ASCII code points using '\xNN' which these codecs don't supports: b'' >>> base64.b64decode('äöü'.encode('ascii')) Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4770> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com