NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: curses(3) handling of UTF-8 in various programs
Leonardo Taccari wrote:
> Hello Cág, Brett and netbsd-users@!
> (I'll reply to both emails here)
Hello Leonardo!
> At least regarding the noice problem, that's just a kludge but a
> possible patch that workaround the problem is attached in this email
> (it can be used as a LOCALPATCHES for sysutils/noice).
> Most printw() calls in noice seems easy to be changed to addstr() ones
> and with them the single bytes are output as-is (IIUC!).
I guess I'll contact upstream about that.
I mentioned moc (Music On Console) that it showed question marks instead
of UTF-8 characters, turns out if you fake ncurses it shows stuff
properly. I'll push it to pkgsrc when I'll stop being lazy ;)
I've got way too much new software so it'd be greedy not to share :)
> The following code should be enough to reproduce what happens in
> noice via argv[]:
>
> #include <locale.h>
> #include <curses.h>
>
> int
> main(int argc, char *argv[])
> {
> int i;
>
> setlocale(LC_ALL, "");
>
> initscr();
> for (i = 1; i < argc; i++)
> printw("%s\n", argv[i]);
> getch();
> endwin();
>
> return 0;
> }
Can we consider this a curses bug?
Thanks for your time and efforts!
--
caóc
Home |
Main Index |
Thread Index |
Old Index