Author tzot
Recipients christian.heimes, ezio.melotti, haypo, mark, pitrou, tzot
Date 2009-05-19.00:08:57
SpamBayes Score 1.66533e-16
Marked as misclassified No
Message-id <>
Just in case it helps, this behaviour is on Win XP Pro, Python 2.5.1:

First, I added an alias for 'cp65001' to 'utf_8' in
Lib/encodings/ .

Then, I opened a command prompt with a bitmap font.

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> print u"\N{EM DASH}"

I switched the font to Lucida Console, and retried (without exiting the
python interpreter, although the behaviour is the same when exiting and
entering again: )

>>> print u"\N{EM DASH}"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 13] Permission denied

Then I tried (by pressing Alt+0233 for é, which is invalid in my normal
cp1253 codepage):

>>> print u"née"

and the interpreter exits without any information. So it does for:

>>> a=u"née"

Then I created a UTF-8 text file named '':

# -*- coding: utf_8 -*-
print a

and tried to run it directly from the command line:

c:\windows\system32>python d:\src\PYTHON\
néeαTraceback (most recent call last):
  File "d:\src\PYTHON\", line 4, in <module>
    print a
IOError: [Errno 2] No such file or directory

You see? It printed all the characters before failing.

Also the following works:

c:\windows\system32>echo heéε


c:\windows\system32>echo heéε >D:\src\PYTHON\dummy.txt

creates successfully a UTF-8 file (without any UTF-8 BOM marks at the

So it's possible that it is a python bug, or at least something can be
done about it.
Date User Action Args
2009-05-19 00:09:06tzotsetrecipients: + tzot, pitrou, haypo, christian.heimes, mark, ezio.melotti
2009-05-19 00:09:05tzotsetmessageid: <>
2009-05-19 00:09:03tzotlinkissue1602 messages
2009-05-19 00:08:58tzotcreate