McParen/croatoan

apparently unicode support was lost with sbcl 2.0.3

cage2 opened this issue · 7 comments

cage2 commented

Hi,

I do not know if just me but after upgraded to sbcl 2.0.3 the support for widechar seems gone and, fir unicode characters, nothing is printed instead; to reproduce just run the test ut01.

Bye!
C.

Thanks, I have not yet tried 2.0.3, I will do that next. At the moment, I am still trying to find out what caused the unicode background routine in ncurses to stop working (issue #28).

cage2 commented
cage2 commented

just define and call, befoe `initscr', the setlocale

Thanks for finding that out, this essentially solves the issue.

probably a better solution needs to be planned.

Why? The call to setlocale is the recommended way to properly start ncurses. From the man page:

The  library uses the locale which the calling program has initialized.
That is normally done with setlocale:

    setlocale(LC_ALL, "");

If the locale is not initialized, the library assumes  that  characters are
printable  as in ISO-8859-1, to work with certain legacy programs.
You should initialize the locale and not rely on  specific  details  of the
library when the locale has not been setup.

Until now, we have simply relied on SBCL doing this for us by default, now we have to do it manually, as every other ncurses app.

cage2 commented

I've pushed a commit adding a call to setlocale to the initialization of screen objects. For direct ncurses calls, you will have to setlocale manually every time, but that's intended.

For me this solves the issue, can it be closed?

cage2 commented