On Tue, Jul 31, 2007 at 09:53:11AM -0700, 7stud wrote:
> s1 = "hello"
> s2 = s1.encode("utf-8")
>
> s1 = "an accented 'e': \xc3\xa9"
> s2 = s1.encode("utf-8")
>
> The last line produces the error:
>
> ---
> Traceback (most recent call last):
> File "test1.py", line 6, in ?
> s2 = s1.encode
En Tue, 31 Jul 2007 16:41:48 -0300, Marc 'BlackJack' Rintsch
<[EMAIL PROTECTED]> escribió:
> On Tue, 31 Jul 2007 10:45:26 -0700, 7stud wrote:
>> On Jul 31, 11:18 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
>> wrote:
>>> str.decode and unicode.encode should NOT exist, or at least issue a
>>> warn
>>> str.decode and unicode.encode should NOT exist, or at least issue a
>>> warning (IMHO).
>>>
>> Yes, that sounds like a good idea.
>
> It sounds like horrible idea as those are the ones that are really needed.
Correct.
> One could argue about `str.encode` and `unicode.decode`. But there ar
On Tue, 31 Jul 2007 10:45:26 -0700, 7stud wrote:
> On Jul 31, 11:18 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> str.decode and unicode.encode should NOT exist, or at least issue a
>> warning (IMHO).
>>
>
> Yes, that sounds like a good idea.
It sounds like horrible idea as those are
On Jul 31, 11:18 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> str.decode and unicode.encode should NOT exist, or at least issue a
> warning (IMHO).
>
Yes, that sounds like a good idea.
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 31 Jul 2007 13:53:11 -0300, 7stud <[EMAIL PROTECTED]>
escribió:
> s1 = "hello"
> s2 = s1.encode("utf-8")
>
> s1 = "an accented 'e': \xc3\xa9"
> s2 = s1.encode("utf-8")
>
> The last line produces the error:
>
> ---
> Traceback (most recent call last):
> File "test1.py", line 6, in ?
>
s1 = "hello"
s2 = s1.encode("utf-8")
s1 = "an accented 'e': \xc3\xa9"
s2 = s1.encode("utf-8")
The last line produces the error:
---
Traceback (most recent call last):
File "test1.py", line 6, in ?
s2 = s1.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position