This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 ocean-city
收信人 ocean-city
日期 2008-03-16.13:37:31
SpamBayes Score 0.10124431
Marked as misclassified
Message-id <1205674653.18.0.28557522559.issue2301@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2008-03-16 13:37:33ocean-city修改spambayes_score: 0.101244 -> 0.10124431
recipients: + ocean-city
2008-03-16 13:37:33ocean-city修改spambayes_score: 0.101244 -> 0.101244
messageid: <1205674653.18.0.28557522559.issue2301@psf.upfronthosting.co.za>
2008-03-16 13:37:32ocean-city链接issue2301 messages
2008-03-16 13:37:31ocean-city创建