print u"\u0432": why is this so hard? UnciodeEncodeError
Skip Montanaro
skip at pobox.com
Mon Apr 12 22:56:07 EDT 2004
Skip> I generally use xterm instead of Terminal.app. I think it's
Skip> encoding is latin-1.
Martin> Not on OS X.
I run xterms under XDarwin. I don't think the default encoding is different
than xterms in any other X environment. If I execute
print u'\xed'.encode("latin-1")
in an xterm I get an accented "i". If I execute
print u'\xed'.encode("utf-8")
in a Terminal window I also get an accented "i".
Skip
More information about the Python-list
mailing list