ãã¤ã使ãæããããããªããªãã®ã§ã¡ã¢(´・Ïï½¥`)
Pythonã®å¯¾è©±ã¢ã¼ãã§encodeã¨decode 使ã£ã¦ã¿ãã
ã¦ãã³ã¼ã -> 'utf8'
>>> u'çã¿ã³'.encode('utf8') '\xe7\x89\x9b\xe3\x82\xbf\xe3\x83\xb3' >>> print '\xe7\x89\x9b\xe3\x82\xbf\xe3\x83\xb3' çã¿ã³
'utf8' ï½°> ã¦ãã³ã¼ã
>>> '\xe7\x89\x9b\xe3\x82\xbf\xe3\x83\xb3'.decode('utf8') u'\u725b\u30bf\u30f3' >>> 'çã¿ã³'.decode('utf8') u'\u725b\u30bf\u30f3' >>> print u'\u725b\u30bf\u30f3' çã¿ã³ >>> unicode('çã¿ã³', 'utf8') u'\u725b\u30bf\u30f3'
ã_ãã便å©
æå¾ã«è¡¨ç¤ºãããã®ãå¤æ° ã_ãã«ä»£å ¥ãããã
>>> _ u'\u725b\u30bf\u30f3' >>> print _ çã¿ã³ >>>
ããã¾ã(ï¾Ðï¾)