google app engine: how to set the python development's encoding environment same as the real one's?
I use python to develop my gae application in ubuntu. In my PC the app works well, but when uploaded to the appspot serve, my program will report encoding errors. like
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 3: ordinal not in range(128)
How to change my development environment to make the encoding 开发者_Python百科setting same?
Thanks.
Call sys.setdefaultencoding('ascii')
somewhere in a module that is loaded for all requests.
精彩评论