Duncan Booth schrieb:
> So you believe that because something is only recommended by a standard
> Python should refuse to implement it?
Yes. In the face of ambiguity, refuse the temptation to guess.
This is *deeply* ambiguous; people have been using all kinds of
encodings in http URLs.
> You do
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
The way that uri encoding is supposed to work is that first the
input string in unicode is encoded to UTF-8 and then each byte
which is not in the permitted range for characters is encoded as %
followed by two hex characters.
>>> Ca
>>> The way that uri encoding is supposed to work is that first the input
>>> string in unicode is encoded to UTF-8 and then each byte which is not in
>>> the permitted range for characters is encoded as % followed by two hex
>>> characters.
>> Can you back up this claim ("is supposed to work") by
Martin v. Löwis wrote:
> Duncan Booth schrieb:
>> The way that uri encoding is supposed to work is that first the input
>> string in unicode is encoded to UTF-8 and then each byte which is not in
>> the permitted range for characters is encoded as % followed by two hex
>> characters.
>
> Can you
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Duncan Booth schrieb:
>> The way that uri encoding is supposed to work is that first the input
>> string in unicode is encoded to UTF-8 and then each byte which is not
>> in the permitted range for characters is encoded as % followed by two
>> hex cha
Duncan Booth schrieb:
> The way that uri encoding is supposed to work is that first the input
> string in unicode is encoded to UTF-8 and then each byte which is not in
> the permitted range for characters is encoded as % followed by two hex
> characters.
Can you back up this claim ("is supposed
Fredrik Lundh wrote:
> George Sakkis wrote:
>
> > The following snippet results in different outcome for (at least) the
> > last three major releases:
> >
> import urllib
> urllib.unquote(u'%94')
> >
> > # Python 2.3.4
> > u'%94'
> >
> > # Python 2.4.2
> > UnicodeDecodeError: 'ascii' code
"Leo Kislov" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
>> The following snippet results in different outcome for (at least) the
>> last three major releases:
>>
>> >>> import urllib
>> >>> urllib.unquote(u'%94')
>>
>> # Python 2.3.4
>> u'%94'
>>
>> # Python 2.4.2
>> UnicodeDecodeError: 'as
George Sakkis wrote:
> The following snippet results in different outcome for (at least) the
> last three major releases:
>
import urllib
urllib.unquote(u'%94')
>
> # Python 2.3.4
> u'%94'
>
> # Python 2.4.2
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0:
> o
George Sakkis wrote:
> The following snippet results in different outcome for (at least) the
> last three major releases:
>
import urllib
urllib.unquote(u'%94')
> # Python 2.4.2
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0:
> ordinal not in range(128)
Pytho
George Sakkis wrote:
> The following snippet results in different outcome for (at least) the
> last three major releases:
>
> >>> import urllib
> >>> urllib.unquote(u'%94')
>
> # Python 2.3.4
> u'%94'
>
> # Python 2.4.2
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0:
> or
11 matches
Mail list logo