zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: UNICODE Private Use Area characters in BUFFER
Date: Mon, 24 Oct 2022 03:27:50 +0200	[thread overview]
Message-ID: <CAHYJk3S0UcuaHZJfHE30p7KMoYw0Y71YS-Mx2WaaJx0Fcjck_Q@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bJxkKxB2jL0jqxdg0-eeb16u1MCcHnMndT9aDdBDwMpw@mail.gmail.com>

On 10/24/22, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Sun, Oct 23, 2022 at 4:35 PM Bart Schaefer <schaefer@brasslantern.com>
> wrote:
>>
>> Asserting that zsh "handles" those characters in other
>> contexts isn't indicative of anything beyond demonstrating that
>> terminal "handling" is a special case.
>
> Seems to me we've got the following options:
>
> 1.  Do nothing.
> 2.  Presume Roman is correct that these characters can always be
> treated as printable and narrow.  (Still no answer as to how best to
> change this?)
> 3.  Add an option UNICODE_PRINTABLE_NARROW that when set, asserts all
> these characters to be printable and narrow.  Default ... on?
> 4.  Add special variable(s) (perhaps via module?) to allow remapping
> the wcwidth9.h lookup tables to make individual characters printable
> and set their width.

I think if we should do anything with wcwidth9.h, it's remove it.
Since adding it there have been 6 subsequent unicode standards, the
latest one adding over 4000 ideographs alone[1] (I don't know what
width the version 9 wcwidth gives for this range). It is probably
returning wrong values for many more thousands of characters on
systems where the libc has newer tables than unicode 9. I suppose it
could be useful to enable when remoting into old systems from a modern
one.

We should probably at least mark it as deprecated, glibc 2.26 added
support for unicode 9 and was released in august 2017, and the unicode
9 wcwidth.h was added to zsh in november 2016, a rather small window
where it mattered. What happened in unicode 9 was that the
presentation width for all emoji was changed to 2[2], I'm not sure how
this motivated people to add custom tables to every program they used
instead of simply updating glibc and have every program be correct at
once...

[1] https://home.unicode.org/announcing-the-unicode-standard-version-15-0/
[2] I couldn't find a more official reference than this atm,
https://github.com/irssi/irssi/issues/720

-- 
Mikael Magnusson


  reply	other threads:[~2022-10-24  1:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 10:12 Roman Perepelitsa
2022-10-23 16:29 ` Mikael Magnusson
2022-10-23 16:43   ` Roman Perepelitsa
2022-10-23 17:02     ` Bart Schaefer
2022-10-23 17:29       ` Roman Perepelitsa
2022-10-23 18:30         ` Unicode9 (was Re: UNICODE Private Use Area characters in BUFFER) Bart Schaefer
2022-10-23 19:30           ` Roman Perepelitsa
2022-10-23 21:57           ` Mikael Magnusson
2022-10-23 18:54         ` UNICODE Private Use Area characters in BUFFER Bart Schaefer
2022-10-23 19:26           ` Roman Perepelitsa
2022-11-04  9:55         ` Jun T
2022-10-23 22:42     ` Mikael Magnusson
2022-10-23 23:16       ` Roman Perepelitsa
2022-10-23 23:35         ` Bart Schaefer
2022-10-23 23:46           ` Bart Schaefer
2022-10-24  1:27             ` Mikael Magnusson [this message]
2022-10-24  1:43               ` Bart Schaefer
2022-10-24 10:50                 ` Roman Perepelitsa
2022-11-04 10:31                   ` Jun T
2022-11-04 10:33                     ` Roman Perepelitsa
2022-11-04 11:06                       ` Jun T
2022-11-04 11:09                         ` Roman Perepelitsa
2022-11-04 15:32                           ` Jun T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHYJk3S0UcuaHZJfHE30p7KMoYw0Y71YS-Mx2WaaJx0Fcjck_Q@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).