emacs-devel
[Top][All Lists]
Advanced

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

Re: Unicode confusables and reordering characters considered harmful, a


From: Eli Zaretskii
Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution
Date: Thu, 04 Nov 2021 21:55:16 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  cpitclaudel@gmail.com,
>   stefan@marxist.se,  emacs-devel@gnu.org,  db48x@db48x.net,
>   yuri.v.khan@gmail.com
> Date: Thu, 04 Nov 2021 15:22:41 -0400
> 
> You mean there is a special kind of danger coming from the invisible
> control characters because they can make code render unexpectedly even
> though all the rendered chars are "familiar" (e.g. all-ASCII)?
> 
> That's a good point.  Maybe a middle ground could be to call the
> attention to such overrides when they're used inside a text line where
> all the chars are of the exact same directionality, but not if the line
> already contains both strong-LTR and strong-RTL characters.

I think the code I just installed does that, and more.

(And note that "all the chars are of the exact same directionality" is
a problematic definition, since the only characters whose
directionality cannot be changed except by these formatting controls
are so-called "strong directional" characters.  By contrast, the
examples in the paper which got us excited deliberately reorder
punctuation characters, which have "weak" directionality, and whose
reordering for malicious purposes is much harder to detect, because
many/most legitimate uses of directional formatting controls is
precisely to avoid the "weak" directional characters taking the
"wrong" direction.  And a typical line of source code will always
include both string and weak directional characters.)



reply via email to

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