Stefan Rank wrote:
> Well, originally, I would have expected it to return a byte str(ing),
I'd assume unicode in, unicode out, and str in, str out, but since it's
always going to produce ASCII-range characters, it wouldn't matter.
Moot point anyway.
> BUT
> I am now converted and think it is best
on 13.07.2006 10:26 Mike Brown said the following:
> Stefan Rank wrote:
>> on 12.07.2006 07:53 Martin v. Löwis said the following:
>>> Anthony Baxter wrote:
> The right thing to do is IRIs.
For 2.5, should we at least detect that it's unicode and raise a
useful error?
>>> That can c
Stefan Rank wrote:
> on 12.07.2006 07:53 Martin v. Löwis said the following:
> > Anthony Baxter wrote:
> >>> The right thing to do is IRIs.
> >> For 2.5, should we at least detect that it's unicode and raise a
> >> useful error?
> >
> > That can certainly be done, sure.
> >
> > Martin
>
> That
on 12.07.2006 07:53 Martin v. Löwis said the following:
> Anthony Baxter wrote:
>>> The right thing to do is IRIs.
>> For 2.5, should we at least detect that it's unicode and raise a
>> useful error?
>
> That can certainly be done, sure.
>
> Martin
That would be great.
And I agree that updati
Anthony Baxter wrote:
>> The right thing to do is IRIs.
>
> For 2.5, should we at least detect that it's unicode and raise a
> useful error?
That can certainly be done, sure.
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python
On Wednesday 12 July 2006 07:16, Martin v. Löwis wrote:
> Stefan Rank wrote:
> > I suggest to add (after 2.5 I assume) one of the following to the
> > beginning of urllib.quote to either fail early and consistently
> > on unicode arguments and improve the error message::
> >
> >if isinstance(s,
Stefan Rank wrote:
> I suggest to add (after 2.5 I assume) one of the following to the
> beginning of urllib.quote to either fail early and consistently on
> unicode arguments and improve the error message::
>
>if isinstance(s, unicode):
>raise TypeError("quote needs a byte string ar
On Tue, 11 Jul 2006, Stefan Rank wrote:
> urllib.quote fails on unicode strings and in an unhelpful way::
[...]
> >>> urllib.quote(u'a\xf1a')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "C:\Python24\lib\urllib.py", line 1117, in quote
> res = map(safe_map.
Stefan> According to a message I found on quixote-users,
Stefan> http://mail.mems-exchange.org/durusmail/quixote-users/5363/ it
Stefan> might have worked prior to 2.4.2.
Confirmed with 2.3.5.
Stefan>if isinstance(s, unicode):
Stefan>s = s.encode('utf-8')
Stef
Hi,
urllib.quote fails on unicode strings and in an unhelpful way::
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> urllib.quote('a\xf1a')
'a%F1a'
>>> url
10 matches
Mail list logo