Support UTF-8 in GET params in python
November 13, 2009 | pythonauthor: Karol Zielinski | comments: 0 | views: 1024
Tags: encoding, python, utf-8
Today… really easy example. I will tell you how to support GET params encoded in UTF-8.
import urllib
param = request.GET[u'param']
param = urllib.quote(param.encode('utf-8'))
The end.
I told you that it will be easy…
Hello, I'm Karol Zielinski, internet evangelist, an entrepreneur, project manager and a web developer from Gdynia, Poland. I like creative design, good advertisement, social media and all kind of stuff around the web.