DeprecationWarning: Non-ASCII character '\xc0'
Skip Montanaro
skip at pobox.com
Fri Feb 6 17:52:13 EST 2004
ahsan> "__main__:1: DeprecationWarning: Non-ASCII character '\xc0' in file
ahsan> trans.py on line 11, but no encoding declared; see
ahsan> http://www.python.org/peps/pep-0263.html for details"
ahsan> I am not sure what encoding to use. I am not sure where to look. I
ahsan> picked one out of the documentation. Here is what I used:
ahsan> # -*- coding: utf-8 -*-
Looks like the data you posted was encoded as iso-8859-1 (aka, latin-1), so
I suggest you use:
# -*- coding: iso-8859-1 -*-
as your coding comment.
ahsan> Questions:
ahsan> 1) Is there a list I can pick the encoding from?
Look at the filenames in the encodings package (part of the standard
distribution).
ahsan> 2) How can I find more about encoding?
Pick and choose from the results in found in these googlings:
http://www.google.com/search?q=encoding+site:www.python.org
http://www.google.com/search?q=unicode+site:www.python.org
Skip
More information about the Python-list
mailing list