Pythonのお勉強 Part15
■ このスレッドは過去ログ倉庫に格納されています
0531デフォルトの名無しさん
2006/11/30(木) 13:04:10http://lowlife.jp/nobonobo/zine/5/6.html
ここを見てsitecustomize.pyを設置しているんですが、
---------------------
Python 2.4.3 on Windows XP
>>> sys.getdefaultencoding()
'mbcs'
>>> print u'ほげ'
ほげ
---------------------
Python 2.3.4 on RedHat EL4
>>> sys.getdefaultencoding()
'UTF-8'
>>> print u"ほげ"
≫
---------------------
Python 2.3 on Debian serge
>>> sys.getdefaultencoding()
'euc-jp'
>>> print u"ほげ"
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeEncodeError: 'euc_jp' codec can't encode character u'\xb2' in position 3\
: illegal multibyte sequence
---------------------
>>> print u"ほげ" がうまく行くのはWindowsだけです。
何かアドバイスをいただけないでしょうか?
■ このスレッドは過去ログ倉庫に格納されています