If you ever tried to add korean in your prints or what have you with python you will notice you get an error looking like this:

SyntaxError: Non-ASCII character ‘\xec’ in file gravity.py on line 10, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Luckily this is an extremely easy fix!

just add this to the top of your script:

# -*- coding: utf-8 -*-

example source with korean:

http://pastebin.com/eXWsxZM9

Enjoy and Happy New Years!

Advertisements