print u"\u0432": why is this so hard? UnciodeEncodeError
David Eppstein
eppstein at ics.uci.edu
Fri Apr 9 11:52:47 EDT 2004
In article <c55tkv$3s4$05$2 at news.t-online.com>,
"Martin v. Lowis" <martin at v.loewis.de> wrote:
> David Eppstein wrote:
> > Well, no.
> >
> > Python 2.3 (#1, Sep 13 2003, 00:49:11)
> > [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
> > Type "help", "copyright", "credits" or "license" for more information.
> >
> >>>>import sys;sys.stdin.encoding
> >
> > 'US-ASCII'
>
> You did not follow Hye-Shik's instructions closely enough. You
> failed to set the LANG environment variable before starting Python.
A system that requires me to manually set the LANG environment variable
is no better than a system that requires me to manually define an
encoding once in Python. It doesn't seem to answer your question about
automatic determination of the Terminal's encoding.
--
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