[issue12568] Add functions to get the width in columns of a character
poq
report at bugs.python.org
Sat Mar 10 17:52:54 CET 2012
poq <poq at gmx.com> added the comment:
Martin, I think you meant to write "if w == 'A':".
Some very common characters have ambiguous widths though (e.g. the Greek alphabet), so you can't just raise an error for them.
http://unicode.org/reports/tr11/ says:
"Ambiguous characters occur in East Asian legacy character sets as wide characters, but as narrow (i.e., normal-width) characters in non-East Asian usage."
So in practice applications can treat ambiguous characters as narrow by default, with a user setting to use legacy (wide) width.
As Tom pointed out there are also a bunch of zero width characters, and characters with special formatting like tab, soft hyphen, ...
----------
nosy: +poq
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12568>
_______________________________________
More information about the Python-bugs-list
mailing list