[Python-Dev] Unicode support of the curses module in Python 3.3
Steven D'Aprano
steve at pearwood.info
Sun Sep 2 00:34:58 CEST 2012
On 01/09/12 23:44, Victor Stinner wrote:
> Hi,
>
> I changed many functions of the curses module in Python 3.3 to improve
> its Unicode support:
[...]
Thank you.
> For example, if the Python curses module is not linked to libncursesw,
> get_wch() is not available and addch("é") raises an OverflowError if
> the locale encoding is UTF-8 (because "é".encode("utf-8") is longer
> than 1 byte).
OverflowError? That is very surprising. I wouldn't guess that calling
addch could raise OverflowError.
Could you use a less surprising exception, or at least make sure that
it is clearly and obviously documented?
--
Steven
More information about the Python-Dev
mailing list