unicode
http://www.kabipan.com/computer/python/unicode.html
http://www.unicode.org/cgi-bin/UnihanGrid.pl?codepoint=U+3000&useutf8=false
UTF-8文字列
http://blog.livedoor.jp/yawamen/archives/51566670.html
http://www.kabipan.com/computer/python/unicode.html
例
>>> import sys >>> text2=u'\u6e7f\u5ea6' >>> type(text2) <type 'unicode'> >>> sys.stdout.write(text2) Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) >>> text2.encode('utf-8') '\xe6\xb9\xbf\xe5\xba\xa6' >>> print text2.encode('utf-8') 湿度 >>> sys.stdout.write (text2.encode('utf-8')) 湿度
めも