Multibyte characters in curses

Hello

Am I the only one who wishes this worked?

Or does it work for everybody and it’s broken only for me?

I tried to look at a ncurses sample program, and made a simple patch
that makes utf-8 sort of work with ncursesw provided that you run in
utf-8 locale. Probably works on Linux/OS X,…
The curses on Windows are different.

Thanks

Michal

On 18/12/2007, Martin D. [email protected] wrote:

application also creates problems.

However, some libraries like ncurses rely on the locale to determine
what characters are printable. It makes some sense to do that, it’s
what the locale was designed for. And unless you set the locale
ncurses won’t display anything outside of iso8859-1.

Thanks

Michal

At 03:53 07/12/18, Michal S. wrote:

The same patch applies to the curses extension in 1.9, and the patched
hello.rb then works as expected.
The only reference to setlocale appears to be in a comment in
time.rb. Perhaps ruby should start to care about locale?

Ruby definitely will start to care about locales, but calling
setlocale may be the wrong thing to do. It would mean for example
that all calls to strcasecmp in the Ruby code have to be carefully
examined. For many programs, the idea of a single locale for an
application also creates problems.

Regards, Martin.

#-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-# http://www.sw.it.aoyama.ac.jp mailto:[email protected]