"Frank Stajano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I find the encode/decode terminology somewhat confusing, because arguably
> both sides are
> "encoded". For example, a unicode-encoded string (I mean a sequence of
> unicode code
> points) should count as "decoded"
Diez B. Roggisch wrote:
>> So why is it that in the first case I got UnicodeEncodeError: 'ascii'
>> codec can't encode? Seems as if, within Idle, a utf-8 codec is being
>> selected automagically... why should that be so there and not in the
>> first case?
>
> I'm a bit confused on what you did whe
> So why is it that in the first case I got UnicodeEncodeError: 'ascii'
> codec can't encode? Seems as if, within Idle, a utf-8 codec is being
> selected automagically... why should that be so there and not in the
> first case?
I'm a bit confused on what you did when the error appears if you t
Diez B. Roggisch wrote:
> Frank Stajano wrote:
>
>> A simple unicode question. How do I print?
>>
>> Sample code:
>>
>> # -*- coding: utf-8 -*-
>> s1 = u"héllô wórld"
>> print s1
>> # Gives UnicodeEncodeError: 'ascii' codec can't encode character
>> # u'\xe9' in position 1: ordinal not in range(12
A simple unicode question. How do I print?
Sample code:
# -*- coding: utf-8 -*-
s1 = u"héllô wórld"
print s1
# Gives UnicodeEncodeError: 'ascii' codec can't encode character
# u'\xe9' in position 1: ordinal not in range(128)
What I actually want to do is slightly more elaborate: read from a tex
Frank Stajano wrote:
> A simple unicode question. How do I print?
>
> Sample code:
>
> # -*- coding: utf-8 -*-
> s1 = u"héllô wórld"
> print s1
> # Gives UnicodeEncodeError: 'ascii' codec can't encode character
> # u'\xe9' in position 1: ordinal not in range(128)
>
>
> What I actually want to