Skip to content

Instantly share code, notes, and snippets.

@mofukuma
Created February 11, 2013 11:43
Show Gist options
  • Save mofukuma/4754011 to your computer and use it in GitHub Desktop.
Save mofukuma/4754011 to your computer and use it in GitHub Desktop.
GAE/Pythonで日本語を使うには内部処理文字コードをUTF-8に設定をする必要あり。
#!-*- coding:utf-8 -*-
#!/usr/bin/env python
#おまじない-------------
import sys
stdin = sys.stdin
stdout = sys.stdout
reload(sys)
sys.setdefaultencoding('utf-8')
sys.stdin = stdin
sys.stdout = stdout
#-----------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment