Python bottle requests and unicode
in this case, to convert it ,I did like this search_field.encode("ISO-8859-1").decode("utf-8")
I'm building a small RESTful API with bottle in python and am currently experiencing an issue with character encodings when working with the request object.
Hitting up http://server.com/api?q=äöü and looking at request.query['q'] on the server gets me "Ã¤Ã¶Ã¼", which is obviously not what I'm looking for.
Same goes for a POST request containing the form-urlencoded key q with the value äöü. request.forms.get('q') contains "Ã¤Ã¶Ã¼".
What's going on here? I don't really have the option of decoding these elements with a different encoding or do I? Is there a general option for bottle to store these in unicode?
Thanks.