emacs-devel
[Top][All Lists]
Advanced

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

Re: Can watermarking Unicode text using invisible differences sneak thro


From: Eli Zaretskii
Subject: Re: Can watermarking Unicode text using invisible differences sneak through Emacs, or can Emacs detect it?
Date: Thu, 20 Jan 2022 09:48:57 +0200

> From: Richard Stallman <rms@gnu.org>
> Date: Wed, 19 Jan 2022 22:17:31 -0500
> Cc: luangruo@yahoo.com, emacs-devel@gnu.org
> 
>   > If you're not expecting zero-width characters in text in general,
>   > I think it's a good setting.
> 
> I think I will try that, just in case someone sends me some of those.
> Thanks.
> 
> Should we make this the default?  I think it is likely that most Emacs users
> will see only malicious zero-width characters, and not useful ones.

"Most users" is not a good argument when for some users these
characters are a must.  As I explained, these characters, when used
for their intended purpose, are necessary for correct shaping of text,
which increasingly includes even plain-ASCII text.  So I will object
to any simplistic default like that.  We should flag suspicious uses
of those characters (which means sequences of several of them in a
row), not lone characters.  The new textsec.el library is developing
the capabilities for detecting such suspicious uses, and we should use
that as the basis for any defaults.

Users who want to flag _any_ use of zero-width characters are free to
do so in their own customizations, of course.

> Is there a way we could detect automatically when these zero-width
> characters are being used in a legit way for their intended purpose,
> and in that case, display them as zero-width for real?

That is the subject of the new textsec.el package that Lars is working
on now.

>   > Emacs by default displays ZWJ and ZWNJ characters (and any other
>   > zero-width characters) as thin 1-pixel spaces on GUI frames, and as
>   > simple spaces on TTY frames.  So Emacs users are likely to see these
>   > "hidden" sequences of characters on display.
> 
> I wonder if we could do something clever to show when there is a
> sequence of multiple different 1-pixel characters?  For instance,
> maybe give different colors to different characters, so that a
> sequence of several shows as a funny spectrum?

textsec.el should provide facilities for that.



reply via email to

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