[Python-Dev] iso-2022 and issue 7472: question for the experts (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Wed Apr 7 02🔞13 CEST 2010
- Previous message: [Python-Dev] iso-2022 and issue 7472: question for the experts
- Next message: [Python-Dev] iso-2022 and issue 7472: question for the experts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Can someone (Steve Turnbull?) confirm or refute my analysis?
Refute, see http://bugs.python.org/issue804885
ISO-2022 input will be 7-bit, and the except will not trigger
This conclusion is false:
- it is 7-bit
py> unichr(913).encode("iso-2022-jp") '\x1b$B&!\x1b(B'
- the except will trigger, anyway.
py> unichr(913).encode("ascii") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u0391' in position 0: ordinal not in range(128)
This issue doesn't get noticed, because it doesn't hurt today's email readers and MTAs to process 8-bit MIME, even if 7-bit had been sufficient.
HTH, Martin
P.S. Notice that Tokio's original patch had the spelling right.
- Previous message: [Python-Dev] iso-2022 and issue 7472: question for the experts
- Next message: [Python-Dev] iso-2022 and issue 7472: question for the experts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]