Anyway to designating the encoding of the "source" for compile?
janeaustine50 at hotmail.com
janeaustine50 at hotmail.com
Sat May 14 12:11:31 EDT 2005
Python's InteractiveInterpreter uses the built-in compile function.
According to the ref. manual, it doesn't seem to concern about the
encoding of the source string.
When I hand in an unicode object, it is encoded in utf-8 automatically.
It can be a problem when I'm building an interactive environment using
"compile", with a different encoding from utf-8. IDLE itself has the
same problem. ( '<a string with non-ascii-encoding>' is treated okay
but u'<a string with non-ascii-encoding>' is treated wrong.)
Any suggestions or any plans in future python versions?
More information about the Python-list
mailing list