Pythonã§ã³ãã³ããã¼ã«ãä½ã£ã¦ã¦ããã¤ãã§ã¤ãªãããããã¨ãã«è²ã ã¯ã¾ã£ãã®ã§ã¡ã¢ã WindowsXPã§Python2.7ã # coding: utf-8 def main(): print u"ãã¹ã" # PYTHONIOENCODINGã§ã¨ã³ã³ã¼ãããã print "ãã¹ã" # ãã®ãã¡ã¤ã«ã®æåã³ã¼ã(utf-8) print u"ãã¹ã".encode('cp932') # cp932ã«ã¨ã³ã³ã¼ãããã if __name__ == '__main__': main() ãããã³ãã³ãããã³ããããå®è¡ããã¨ãããªãã >python test.py ãã¹ã ç¹ã»ãç¹ ãã¹ããã®åºåããæååãããªãç¶æ ã§ãã¡ã¤ã«ã«æ¸ãåºãããã ã¡ãªã¿ã«ãåºåããªãã¤ã¬ã¯ããããã¨ããã¨ã¨ã©ã¼ã«ãªãã >python test.py > test.txt Traceback (m
{{#tags}}- {{label}}
{{/tags}}