Re: [Python-Dev] Unicode support of the curses module in Python 3.3

2012-09-02 Thread Victor Stinner
>> 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

Re: [Python-Dev] Unicode support of the curses module in Python 3.3

2012-09-01 Thread Steven D'Aprano
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

[Python-Dev] Unicode support of the curses module in Python 3.3

2012-09-01 Thread Victor Stinner
Hi, I changed many functions of the curses module in Python 3.3 to improve its Unicode support: - new functions: curses.unget_wch() and window.get_wch() - new attribute: window.encoding - the default encoding is now the locale encoding instead of UTF-8 - use the C functions *_wch() and *wstr()