unicode encoding problem
"Martin v. Löwis"
martin at v.loewis.de
Thu Apr 28 17:53:02 EDT 2005
garykpdx at hotmail.com wrote:
> So how do I tell what encoding my unicode string is in, and how do I
> retrieve that when I read it from a file?
In interactive mode, you best avoid non-ASCII characters in a Unicode
literal.
In theory, Python should look at sys.stdin.encoding when processing
the interactive source. In practice, various Python releases ignore
sys.stdin.encoding, and just assume it is Latin-1. What is
sys.stdin.encoding on your system?
Regards,
Martin
More information about the Python-list
mailing list