bug-ncurses
[Top][All Lists]
Advanced

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

Re: problem with emoji


From: Timothy Allen
Subject: Re: problem with emoji
Date: Wed, 06 Feb 2019 22:07:17 +1100
User-agent: Evolution 3.30.4-1

On Wed, 2019-02-06 at 11:40 +0100, folkert wrote:
> > ncurses "knows" about double-width characters if wcwidth says they
> > are.
> > Some emojis aren't encoded in wcwidth (and some fonts don't agree
> > with
> > wcwidth).
> 
> So what should I do? Pick a different font? Or just filter out these
> double-cell characters? (any ideas how to recognize them by their
> value?)

It's not specifically double-cell characters that are the problem, it's
characters whose width is reported differently by components of the
system (libc, the terminal emulator, the font-drawing API, the font,
etc.). Every year, the Unicode consortium publishes a new version of
the Unicode standard, which adds new characters and rules for how to
draw them. Every component of the system has to follow the same rules
for things to work properly, so if libc follows the rules for Unicode
9.0 while the terminal emulator is following the rules for Unicode
10.0, any characters added in Unicode 10.0 are likely to make a mess.

Different system components are updated at different rates, so it can
be some time before a given character works reliably everywhere. If you
can stick to older Unicode characters, or even plain ASCII, that'd
help. If you can update everything to the latest available versions,
that'd help too... at least until the next version of Unicode is
released.




reply via email to

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