- 857 名前:デフォルトの名無しさん mailto:sage [2010/01/20(水) 21:47:58 ]
- >>856
詳しくはわかりませんが、Win環境のPythonとPyScripterの相性のようです。 Python標準シェルとIPythonの挙動が違う意味がわからないので質問します。 Python IPython >>>str = u"あ" >>>str = u"あ" >>>type(str) >>>type(str) <type 'unicode'> <type 'unicode'> >>>str >>>str u'\u3042 u'\x82\xa0' >>>print str >>>print str あ UnicodeEncodeError:'cp932'〜〜 1.u"あ"を代入した時点で、strはUnicode文字列型になっている 2.IPythonはstr参照時にUnicode文字列型を文字列型にエンコードしなおしている と言う理解であってますか?そしてこれはバグですか? ttp://dsas.blog.klab.org/archives/51390187.htmlの方法で解決するみたいなんですが 正当なやりかたなのか気になります。
|

|