On Sun, Jun 15, 2025 at 12:15:23AM +0000, zahlman via Bug reports for ncurses, the GNU implementation of curses wrote: > Some background first: > > Version 3.2 of the Unicode standard introduced a block of so-called > "variation selector" characters, which are not themselves printable but > rather provide a hint about what glyph to use for the preceding > grapheme cluster. Since version 9.0, variation selector 16 (Unicode code > point U+FE0F) is defined to request an emoji-like appearance for the > character, which are expected to appear as "full width" i.e. 2 columns > in a terminal. Some references: > https://en.wikipedia.org/wiki/Variation_Selectors_(Unicode_block) > https://www.unicode.org/reports/tr51/#Display > https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/9 > > As seen from the third link, terminal authors have struggled with the > details of implementing this - since now a character can supposedly > *modify* the width of a *previous* character, rather than simply having > a width of its own - invalidating the entire concept of `wcwidth`, for > example.
yes, that's one of the problems introduced with this feature. The other is its lack of reuse/integration with the existing features in C and terminals. Currently it's only on my to-do list as documentation-needed. Perhaps someone will take the time to provide an efficient implementation (I'm not aware of any). https://invisible-island.net/personal/self-service.html > However, currently ncurses is compounding the problem by handling the > variation selector character inconsistently *when processing it* and > supplying it to the terminal, which is the bug I am reporting here. I wouldn't say "compounding", but rather "not providing specialized logic to work around the design limitations", etc. -- Thomas E. Dickey <dic...@invisible-island.net> https://invisible-island.net
signature.asc
Description: PGP signature