I am working on an rest API. Here some objects with weird letters in them are requested by the client using percent escaping (This is beyond by control).
So a request for:
http://example.com/auth/groups/KØVS/
Is requested like so:
http://example.com/auth/groups/K%2BVS/
When i get this value in my Django view i need it as a regular or Unicode string but i cannot seem to figure out how.
Niether:
urllib.unquote_plus(variable)
Nor:
urllib.unquote_plus(variable).encode('UTF8')
...reassembles the original string... what am i missing?
Best wishes
Morten Pedersen
Denmark
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment