A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-July/081045.html below:

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

[Python-Dev] urllib.quote and unquote - Unicode issues [Python-Dev] urllib.quote and unquote - Unicode issuesBill Janssen janssen at parc.com
Sun Jul 13 22:36:06 CEST 2008
> Ah there may be some confusion here. We're only dealing with str->str
> transformations (which in Python 3 means Unicode strings). You can't put a
> bytes in or get a bytes out of either of these functions. I suggested a
> "quote_raw" and "unquote_raw" function which would let you do this.

Ah, well, that's a problem.  Clearly the unquote is str->bytes, while
the quote is (bytes OR str)->str.  You can't pass a Unicode string back
as the result of unquote *without* passing in an encoding specifier,
because the character set is application-specific.

Bill
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4