TIP: Click on subject to list as thread! ANSI
echo: linux_bbs
to: Joseph Larsen
from: Kevin Lamonte
date: 2019-07-18 14:48:00
subject: Ncurses and extended ASCI

-=> Joseph Larsen wrote to All <=-

 JL> Hi,

 JL> After some time in the hospital, i've started work on igTerm again.
 JL> I'm having problems with it (igTerm) not displaying extended ASCII
 JL> characters as it should, in ncurses. Rather than the actual character,
 JL> it'll display ^B for example. I'm not sure how to go about solving
 JL> this. This is in the C programming language. I've made some progress...
 JL> however, this problem remains. Any and all help is appreciated.

If you are trying to get CP437 glyphs on the screen, your best modern
solution with ncurses is to use Unicode.  I've got some ncurses
pointers over at https://gitlab.com/klamonte/terminal-snippets.  This
one might help you:

Screen: How Do I Output Unicode?
--------------------------------

Use setcchar(), mvwadd_wch(), and wadd_wch().  For lines, use
mvwhline_set() and mvwvline_set().  Example code:

```
    cchar_t ncurses_ch;
    wchar_t wch[2];
    wch[0] = ch;
    wch[1] = 0;
    setcchar(&ncurses_ch, wch, A_NORMAL, 0, NULL);
    mvwadd_wch(stdscr, y, x, &ncurses_ch);
```

This example just spits one code point to screen.  It is possible to
add more code points for the same cell (e.g. accents), just make wch[]
bigger and put more code points in the array.

....

Best of luck.


... MultiMail, the new multi-platform, multi-format offline reader!
--- MultiMail/Linux v0.49
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
SEEN-BY: 103/705 154/10 203/0 218/700 221/0 1 360 229/426 240/5832 280/464
SEEN-BY: 280/5003 292/854 310/31 320/219 396/45 423/120 633/0 267 280 281 384
SEEN-BY: 633/410 412 509 640/1321 1384 712/848 770/1 2452/250
@PATH: 103/705 280/464 221/1 640/1384 633/280 267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.