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/2015-November/142179.html below:

[Python-Dev] Support of UTF-16 and UTF-32 source encodings

[Python-Dev] Support of UTF-16 and UTF-32 source encodings [Python-Dev] Support of UTF-16 and UTF-32 source encodingsPaul Moore p.f.moore at gmail.com
Sun Nov 15 07:56:18 EST 2015
On 15 November 2015 at 07:23, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> I don't see any good reason for allowing non-ASCII-compatible
> encodings in the reference CPython interpreter.

>From PEP 263:

       Any encoding which allows processing the first two lines in the
       way indicated above is allowed as source code encoding, this
       includes ASCII compatible encodings as well as certain
       multi-byte encodings such as Shift_JIS. It does not include
       encodings which use two or more bytes for all characters like
       e.g. UTF-16. The reason for this is to keep the encoding
       detection algorithm in the tokenizer simple.

So this pretty much confirms that double-byte encodings are not valid
for Python source files.

Paul
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