OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Valid encodings for a Python source file


On 6/7/2018 4:40 PM, Daniel Glus wrote:
> I'm trying to figure out the entire list of possible encodings for a Python
> source file - that is, encodings that can go in a PEP 263
> <https://www.python.org/dev/peps/pep-0263/> encoding specification, like #
> -*- encoding: foo -*-.

For new code for python 3, don't use an encoding cookie.  Use an editor 
that can save in utf-8 and tell it to do so if it does not do so by default.

-- 
Terry Jan Reedy