[Python-Dev] Python dies upon printing UNICODE using UTF-8

sismex01@hebmex.com sismex01@hebmex.com
Wed, 16 Apr 2003 08:38:14 -0500

I've found something very, very strange: the interpreter
dies on me when printing a UTF-8 encoded unicode object,
when the terminal has a unicode codepage.

Before anyone asks, I'm running on Windows NT 4.

First, I read this message on Python-List from
Ben Hutchings:

> UTF-8 is code page 65001.
> Strangely, though, I get 'permission denied' when I run "chcp 65001" =
> then try to print a UTF-8-encoded Euro sign.  I don't know what could =
> going wrong there.

So, promptly, I opened a console window, changed the codepage using
the above command and started Python.

When executing the following:

>>> print u"h=F2l=E1".encode("utf-8")

[in case it doesn't print out correctly, using html entities,
it's "hòlá".encode("utf-8")]

the interpreter simply exits without any message, exception,
peep, anything; it simply quits without printing anything.

Any suggestions?


pd: Before anybody mentions adding a bug report in SF, I must
    warn that I don't have web access, only email access.