Kamil Rytarowski, le sam. 27 avril 2019 19:36:40 +0200, a ecrit: > On 27.04.2019 18:30, Samuel Thibault wrote: > > E.g. BSD and Solaris even use locale-specific encoding there. > > > > We thus have to go through the native multibyte representation and use > > mbtowc/wctomb to make a proper conversion. > > > > Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > > Both patches work for me on NetBSD/amd64 8.99.37 for qemu-system-x86_64. > Borders are printed correctly. > > Regarding the patch I'm not sure whether to use MB_LEN_MAX or MB_CUR_MAX?
I don't know if qemu can afford VLA? > I'm also unsure whether to reset conversion state between a multibyte > character and wide character, with: `mbtowc(NULL, 0, 0);`. It's > recommended to use in code examples examples. I think it doesn't make > any harm to use it. Mmm, better yet, we should actually use mbrtowc and wcrtomb. I have fixed this in my tree. > I'm not sure if this is related, but "qemu-system-hppa -curses" is > broken for me. I didn't use it in the past as it just recently acquired > NetBSD guest support. > > (lldb) bt > libcurses.so.7`mvwadd_wchnstr(win=0x0000000000000000, y=<unavailable>, > x=<unavailable>, wchstr=0x00007f7fffffe020, n=0) at add_wchstr.c:123 > * frame #2: 0x000000000078629e > qemu-system-hppa`curses_update(dcl=0x00007f7ff7bd8bc0, x=0, y=0, w=79, > h=24) at curses.c:86:9 > frame #3: 0x0000000000753dae > qemu-system-hppa`dpy_text_update(con=0x00007f7ff7bae580, x=0, y=0, w=79, > (lldb) p screenpad > (WINDOW *) $2 = 0x0000000000000000 I don't think this is related at all, screenpad management is another matter. Samuel