Unicode question

Gerhard Häring gh at ghaering.de
Fri Jul 18 11:51:18 CEST 2003


Gerhard Häring wrote:
> Ricardo Bugalho wrote:
>> On Fri, 18 Jul 2003 02:07:13 +0200, Gerhard Häring wrote:
>>
>>>> Gerhard Häring <gh at ghaering.de> writes:
>>>>
>>>>>>>> u"äöü"
>>>>>
>>>>> u'\x84\x94\x81'
>>>>> [this works, but IMO shouldn't]

> [...]
> You'll get warnings if you don't define an encoding (either encoding 
> cookie or BOM) and use 8-Bit characters in your source files. These 
> warnings will becomome errors in later Python versions.
> 
> It's all in the PEP :)

I feel like an idiot now :-( I do get the warnings when I run a Python 
script, but I do not get the warnings when I'm using the interactive 
prompt. So it's all good (almost). Why not also produce warnings at the 
interactive prompt?

-- Gerhard





More information about the Python-list mailing list