bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extended ASCII characters do not show up


From: Thomas Dickey
Subject: Re: extended ASCII characters do not show up
Date: Sat, 1 Oct 2005 14:33:55 -0400 (EDT)

On Sat, 1 Oct 2005, amores perros wrote:

The ACS_xxx symbols are a character (which corresponds to the vt100 line-drawing), with A_ALTCHARSET added. ncurses keeps track of the A_ALTCHARSET, and when it is time to write the data to the screen, checks to see if the encoding is UTF-8. If so, it checks some special cases (such as Linux console) to see if it should not try to use the terminfo string to transform its internal character to the terminal's equivalent.

Its a little tough to follow looking at ncurses sources, as I think
these .in files will expand after some autotools, but
A_ALTCHARSET probably expands to  NCURSES_BITS(@cf_cv_1UL@,14),
and NCURSES_BITS probably expands via

#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT))

so I think A_ALTCHARSET sets at least 14 bits up (and WA_ALTCHARSET
is the same thing as A_ALTCHARSET).

close: A_ALTCHARSET is a mask containing 1 bit, shifted up left bits.

In libncurses, the A_CHARTEXT mask corresponds to the bits in a chtype that are used to store an 8-bit character. In libncursesw that mask is not used much, since the character data is ultimately stored in the .chars[] array of cchar_t rather than in the chtype data.

I don't know what a "terminfo acsc string" is, but I think I'm
content with the level of my limited understanding now, and
thanks for pointing out where the table is, to see what unicode
characters are being used for drawing.

no problem

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]