New submission from Hirokazu Yamamoto <[EMAIL PROTECTED]>:

Following code

# coding: utf-8
print "年"

outputs

C:\Documents and Settings\WhiteRabbit>py3k b.py
  File "b.py", line 3
    print "年"

as expected, but following code

# coding: cp932
print "年"

outputs

C:\Documents and Settings\WhiteRabbit>py3k a.py
  File "a.py", line 4
    [22605 refs]

Probably this happens because PyUnicode_DecodeUTF8 at
Python/pythonrun.c(1757) assumes err->text to be UTF8, but this is not
true when source file is not encoded with UTF8.

# Sorry there is no patch.

----------
components: None
messages: 63576
nosy: ocean-city
severity: normal
status: open
title: [Py3k]
type: behavior
versions: Python 3.0

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2301>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to