[問題] utf-8的問題
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
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 5 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章