[Python-Dev] urllib.quote and unquote - Unicode issues

Stephen J. Turnbull stephen at xemacs.org
Thu Jul 31 12:13:35 CEST 2008


Bill Janssen writes:
 > > A quoting function that accepts bytes *must* have an encoding
 > > argument.
 > 
 > Huh? What would it use it for?
Ah, you're right. I was thinking in terms of an URI builder, where the
quoter would do any required conversion (eg, if the bytes represented
a string in Japanese) to another (possibly scheme-mandated) encoding
(typically UTF-8). But that doesn't really make sense; the URI
builder should know what to do, and that's a better place to do such
conversions.


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /