views:

21

answers:

1

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 setting same?

Thanks.

A: 

Call sys.setdefaultencoding('ascii') somewhere in a module that is loaded for all requests.

Nick Johnson