I would like to set the default encoding to utf-8 for my python27 appengine site. The default is ascii.
There was a similar question answered http://code.google.com/p/googleappengine/issues/detail?id=5923. It says to not use sys.reload after setting the default encoding or you will lose a request.
How can i set utf-8 encoding for my entire python appengine site, without having to encode strings specifically like the link suggests above?
Thanks for any help.
You can start your python 27 code (every Python file) with:
But sometimes you have to use .encode('ascii') if you use HMAC or you have to set http headers. Or you can use:
or
And make sure: