PEP 3131: Supporting Non-ASCII Identifiers

René Fleschenberg rene at korteklippe.de
Wed May 16 06:36:26 EDT 2007


Christophe schrieb:

> Who displays stack frames? Your code. 

Wrong.

> Whose code includes unicode
> identifiers? Your code. 

Wrong.

> Whose fault is it to create a stack trace
> display procedure that cannot handle unicode? You. 

Wrong. If you never have to deal with other people's code,
congratulations to you. Many other people have to. And no, I can usualy
not just tell the person to fix his code. I need to deal with it.

> Even if you don't
> make use of them, you still have to fix the stack trace display
> procedure because the exception error message can include unicode text
> *today*

The error message can, but at least the function names and other
identifiers can not.

> You should know that displaying and editing UTF-8 text as if it was
> latin-1 works very very well.s

No, this only works for those characters that are in the ASCII range.
For all the other characters it does not work well at all.

> Also, Terminals have support for UTF-8 encodings already. 

Some have, some have not. And you not only need a terminal that can
handle UTF-8 data, you also need a font that has a glyph for all the
characters you need to handle, and you may also need a way to actualy
enter those characters with your keyboard.

-- 
René



More information about the Python-list mailing list