UTF-8 percentage encoding and python
Your file has to encode your string as utf-8
before quoting it, and the string should be unicode. Also you have to specify the appropriate file encoding for your source file in the coding
section:
# -*- coding: utf-8 -*-
import urllib
s = u'î'
print urllib.quote(s.encode('utf-8'))
Gives me the output:
%C3%AE