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
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' cod
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