I’m working on a Google App Engine project. When I user jQuery to send a serialized form as a html post, I get some encoded charcters instead of non-english characters. Using pure HTML is not a problem.
In the serialized result, I get: ".... defaultgroupcity=Lang%C3%A5 ...", but I should get: "defaultgroupcity=Langå".
Now this character conversion has been a problem for me for far too long in other projects and I need to get it right. Before this project, I used to do a replace("%C3%A5", "å"), but it’s a ugly hack and not a long term solution.
Can someone lead me to a solution? I want to learn the darn thing properly. There must be a generic way to fix character conversion. What am I missing?
You need urllib.unquote() and certainly The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) and the Python Unicode HOWTO.
Your first temptation will be to think “this is way to complicated for å”, and it is, but blame humanity for the general problem for which Unicode is the solution.