A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-April/099131.html below:

[Python-Dev] iso-2022 and issue 7472: question for the experts

[Python-Dev] iso-2022 and issue 7472: question for the experts [Python-Dev] iso-2022 and issue 7472: question for the experts"Martin v. Löwis" martin at v.loewis.de
Wed Apr 7 02:18:13 CEST 2010
> 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:

1. it is 7-bit

py> unichr(913).encode("iso-2022-jp")
'\x1b$B&!\x1b(B'

2. the except *will* trigger, anyway.

py> unichr(913).encode("ascii")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4