I’m trying to get a GET parameter value that looks like this:
http://someurl/handler.json?&q=%E1%F8%E0%F1%F8%E9
The q parameter in this case is Hebrew.
I’m trying to read the value using the following code:
request.GET.get("q", None)
I’m getting gybrish instead of the correct text.
Any idea what’s wrong here? Am I missing some setting?
The query string is in ISO-8859-8, but Django’s default encoding is UTF-8. You will have to change either
DEFAULT_CHARSETorHttpRequest.encodingto ISO-8859-8 to get the correct Unicode data.