print u"\u0432": why is this so hard? UnciodeEncodeError
Michael Hudson
mwh at python.net
Sat Apr 10 13:16:28 EDT 2004
"Martin v. Löwis" <martin at v.loewis.de> writes:
> David Eppstein wrote:
> > Py2.3 sure doesn't discover the encoding of my terminal automatically:
> > hyperbolic ~: python
> > Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple
> > Computer, Inc. build 1495)] on darwin
>
> Ah, Darwin. You lose.
>
> If anybody can tell me how to programmatically discover the encoding
> of Terminal.App, I'll happily incorporate a change into a 2.3.x release.
The user can set it per-terminal, at runtime, with no notification to
the running process that it has done so!
You can't even find out the encoding in use via apple events, which is
a bit of surprise. Filing a bug with apple might get that changed for
10.4...
Cheers,
mwh
--
Reading Slashdot can [...] often be worse than useless, especially
to young and budding programmers: it can give you exactly the wrong
idea about the technical issues it raises.
-- http://www.cs.washington.edu/homes/klee/misc/slashdot.html#reasons
More information about the Python-list
mailing list