print u"\u0432": why is this so hard? UnciodeEncodeError
David Eppstein
eppstein at ics.uci.edu
Sun Apr 11 22:35:20 EDT 2004
In article <eppstein-2EEC95.17502411042004 at news.service.uci.edu>,
David Eppstein <eppstein at ics.uci.edu> wrote:
> > I wonder how much would break if Python would assume the terminal
> > encoding is UTF-8 on Darwin. Do people use different terminal
> > encodings?
>
> Now I'm curious -- how do you even find out it's a Terminal window
> you're looking at, rather than say an xterm?
Never mind, I just did a printenv and saw
TERM_PROGRAM=Apple_Terminal
But I also saw
__CF_USER_TEXT_ENCODING=0x1F5:0:0
...I wonder who's putting that there?
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list