Pythonのお勉強 Part8
■ このスレッドは過去ログ倉庫に格納されています
0665デフォルトの名無しさん
2006/02/06(月) 03:40:02これがどうも気になるんだけど。変換テーブルまわりの問題かな。
>>> ustr_nihao = u'c:\\temp\\\u4e2d\u6587\u7684\u4f60\u597d.txt'
>>> ustr_nihao
u'c:\\temp\\\u4e2d\u6587\u7684\u4f60\u597d.txt'
>>> ustr_nihao.encode("mbcs")
'c:\\temp\\\x92\x86\x95\xb6\x93I?\x8dD.txt'
■ このスレッドは過去ログ倉庫に格納されています