[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question: How does ncurses store and handle "wide" characters?
From: |
Bill Gray |
Subject: |
Re: Question: How does ncurses store and handle "wide" characters? |
Date: |
Mon, 31 May 2021 12:30:54 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 5/31/21 9:45 AM, Thomas Dickey wrote:
I haven't found it necessary to show the bit layout, since the header file
is commented well enough :-)
The MANUAL.md text Peter cites was automatically extracted
from the PDCursesMod curses.h header. As you suggest, the header
file is the logical place to document such things.
By default, a 64-bit chtype is used [in PDCursesMod] :
...which doesn't allow for combining-characters :-)
Au contraire. Combining characters _are_ handled in PDCursesMod,
though using a scheme very different from the ncurses one :
https://github.com/Bill-Gray/PDCursesMod/blob/master/pdcurses/addch.c#L281
See, e.g., the next-to-bottom line in the screen shot at
https://www.projectpluto.com/win32a.htm
I did consider the "array of wchar_t" approach (or more likely,
win_t to get around Microsoft's 16-bit wchar_ts), and that would
have been straightforward enough in some ways. But I'd really have
had to rip a lot of code apart to do that in PDCursesMod.
-- Bill