0

Some wide characters like ACS_ULCORNER and others are working fine, where as ACS_BLOCK and ACS_CKBOARD are not working as expected, instead they are shown as #.

Code Used for the program and

enter image description here

Compiled using this command.

gcc test2.c -lncurses -o test2

I highlighted both with White arrows for easy identification.

VAR121
  • 512
  • 2
  • 5
  • 16
  • Please show the code and/or state the errors. Please don't use links to images. The text is missing from the question. The text on the picture is too small for some people to read. The text on the image cannot be indexed by search engines for future visitors. Also see [Why not upload images of code on SO when asking a question?](https://meta.stackoverflow.com/q/285551/608639) – jww Mar 30 '19 at 15:13
  • Actually all that's needed is the value of `TERM` (and possibly which system is used, and what version of ncurses). – Thomas Dickey Mar 30 '19 at 15:35

1 Answers1

1

What's missing is this:

     setlocale(LC_ALL, "");

If your locale supports UTF-8, then ncurses will check a built-in table of Unicode values to augment the terminal description's acsc string.

Here's xterm displaying equivalent information using the ncurses test-program:

ncurses with alternate character-set in uxterm

while the terminal description omits some of those, as shown by my modified version of altchars:

Unknown line drawing character label(s) found in acsc capability:
|
Unassigned characters from the alternate character set:
h   board of squares
+   arrow pointing right
,   arrow pointing left
-   arrow pointing up
.   arrow pointing down
I   lantern symbol (old)
0   solid square block
Start alternate character set sequence: ^[(0
End alternate character set sequence: ^[(B
Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • `setlocale(LC_ALL, "");` along with using linking `ncursesw` worked fine. But in perl, problem is there. Will have to figure out how to do this in perl. – VAR121 Mar 30 '19 at 17:10
  • (barring "perl6"...) perl doesn't actually use those ncurses features (I'd expect only the characters defined in terminfo to work). But when you have something specific, a perl script demonstrating the problem would help. – Thomas Dickey Mar 30 '19 at 17:35