Replacing curses
Ian Ward
ian at excess.org
Fri Feb 10 15:14:00 EST 2006
Ross Ridge wrote:
> In general it's impossible to know how many display positions some
> random Unicode character might use. For example, Chinese characters
> normally take two display positions, but the terminal your using might
> not support them and display a single width replacement character.
> Hopefully, you're limitted in the character set you actually need to
> support and the terminals that your applicaiton will be using.
I'm not so lucky -- I'm writing a console UI library (Urwid) that anyone
could use, and I'm trying to support as many encodings and terminals as
possible.
I hope that the different terminal behaviors can be enumerated so that
the console interface will degrade gracefully with less capable
terminals. The mined_2000 unicode text editor is a program that does
this by detecting the terminal's behavior on startup. I'll probably take
a similar approach.
Ian Ward
More information about the Python-list
mailing list