http://victorlin.serveftp.org/programming/article/?article_id=24
複製下來的code,用python shell直接執行倒是正確無誤
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.117.195.29
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的來源是這裡