[Python-Dev] PEP 263 -- Python Source Code Encoding

Guido van Rossum guido@python.org
Wed, 27 Feb 2002 07:52:42 -0500


> So how about this:
> 
> In phase 1, the tokenizer checks the *complete file* for
> non-ASCII characters and outputs single warning 
> per file if it doesn't find a coding declaration at
> the top. Unicode literals continue to use [raw-]unicode-escape
> as codec.
> 
> In phase 2, we enforce ASCII as default encoding, i.e.
> the warning will turn into an error. The [raw-]unicode-escape
> codec will be extended to also support converting Unicode
> to Unicode, that is, only handle escape sequences in this
> case.

+1.

--Guido van Rossum (home page: http://www.python.org/~guido/)