[DRE-maint] Bug#477366: ncursesw cannot work with ruby 1.8

Michal Suchanek hramrach at centrum.cz
Mon May 10 16:32:18 UTC 2010


Hello

I tried to patch the built-in ruby-curses extension to use ncursesw
some time ago and it would not work correctly with ruby 1.8.

The reason is that ruby relies on the locale to be "C" internally and
sets locale that way. The ncurses library in turn relies on correctly
set locale to determine the encoding and string length.
With C locale it will report the length of the string as the number of bytes.

Version 1.9 of ruby now sets locale correctly so an extension linked
with ncursesw should also work correctly without any use of the wide
API, just using the standard API with strings in current locale (even
UTF-8) should work. It required quite a few fixes to the interpreter
to allow for this, though. Until these are backported to 1.8
utf-8+ncurses+ruby1.8 is not going to work well I suspect.

Thanks

Michal





More information about the Pkg-ruby-extras-maintainers mailing list