On Thu, 26 May 2005, Martin Michlmayr wrote:
* Edmund GRIMLEY EVANS <[EMAIL PROTECTED]> [2005-05-26 22:58]:
I think you have to link with ncursesw and call setlocale:
That works. Is ncursesw completely backwards compatible (not on an
ABI level, but API wise)? Or will it break Latin-1 locales?
It's compatible - but bear in mind that strings, e.g., as passed to
addstr() are interpreted based on locale. ncurses only knows about 8-bit
single-byte encodings, while ncursesw can interpret multibyte encodings.
What is needed to get the Python bindings (in Debian) to handle UTF-8
and Latin-1? Is it enough to:
- add that setlocale statement in the bindings
- build against ncursesw instead of ncurses
That's a start - but there may be some work needed in Python, e.g.,
to ensure that it doesn't make assumptions about the data that interfere
with locale.
The scripts may also have stuff hardcoded - I don't know (will probably
take a look on the weekend).
Or is anything else needed? Edmund, since you know both UTF-8, curses
and Python, maybe you could take a look at the Python curses bindings.
They don't seem to be maintained actively.
jack (an audio rupper) and cplay (an audio player) are both curses
based Python programs that fail with UTF-8. While I was able to fix
most of their UTF-8 problems (like OGG Vorbis and MP3 tagging), the
curses output problems remains.
--
Martin Michlmayr
http://www.cyrius.com/
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]