Introduction-to-Tornado/Introduction-to-Tornado — pull request #3 by quiver (2012-03-31 16:24:26+00:00)
Title: fix non-ascii character encoding problem

tornado.web.RequestHandler.get_argument returns a unicode string.
http://www.tornadoweb.org/documentation/web.html?#tornado.web.RequestHandler.get_argument

And urllib.urlencode converts unicode chars into string chars before percent-encoding them.
If an argument contains non-ascii characters, encoding(default charset is system dependent) results in UnicodeEncodeError.

Example query:
http://HOST:8000/?q=%E3%83%88%E3%83%AB%E3%83%8D%E3%83%BC%E3%83%89