UTF-8% - Codierung und python

Ich versuche python zu geben, mich Prozent-kodierte strings. Die API-ich bin die Interaktion mit (was ich denke, ist mit Prozent-codierte UTF-8), gibt %c3%ae für î. Allerdings, python ist das urllib.Zitat gibt %3F.

import urllib

mystring = "î"
print urllib.quote(mystring)
print urllib.quote_plus(mystring)
print urllib.quote(mystring.encode('utf-8'))

Jede Hilfe dankbar.

  • Ich habe ausgeführt, Ihren code, druckt es %C3%AE. %3F, btw, ist ? char kodiert.
InformationsquelleAutor user1379351 | 2013-08-10
Schreibe einen Kommentar