作者hl4 (Zec)
看板Python
标题[问题] utf-8的问题
时间Sun Feb 10 20:33:36 2008
Traceback (most recent call last):
File "C:\Documents and Settings\chiao\\WorkSpace\weather\src\weather.py",
line 53, in <module>
print "%s %s %s %s %s" % tuple(Parser.weather)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3:
ordinal not in range(128)
--
我用eclipse和pydev来执行的
eclipse 的 console encoding 和 text file encoding 都改成 utf-8 了
code的来源是这里
http://victorlin.serveftp.org/programming/article/?article_id=24
复制下来的code,用python shell直接执行倒是正确无误
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.117.195.29