Если вы используете django, вы можете использовать urlquote:
>>> from django.utils.http import urlquote >>> urlquote(u"Müller") u'M%C3%BCller'