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: Mon, 31 Jan 2022 15:05:33 +0200

> From: Richard Stallman <rms@gnu.org>
> Cc: psainty@orcon.net.nz, luangruo@yahoo.com, emacs-devel@gnu.org,
>       kevin.legouguec@gmail.com
> Date: Sun, 30 Jan 2022 23:02:14 -0500
> 
>   >   Would it be good enough to have a command that will arrange for these
>   >   ligatures to be displayed as their ASCII equivalents, using the
>   >   facilities in latin1-disp.el?
> 
> I'm not sure, because I don't know what that would be like in
> practice.  If I could see it actually handle some characters, I would
> probably see how to answer.

Please try the patch below.

>   > ẵ is not supported by latin1-display, as it is not an ISO 8859
>   > character.  You need to turn on a more thorough feature.  Try this:
> 
>   >   M-x latin1-display-ucs-per-lynx RET
> 
> I just gave that command, but it doesn't do anything for the ẵ
> character.

The patch below should fix this as well, I hope.

>   >   I could show you how to install such a
>   > composition rule, but I don't think it will do anything on your
>   > console, since it doesn't support ligatures.
> 
> I don't WANT autocomposition on my Linux terminal.

Well, you keep mentioning auto-composition, so I'm answering your
implied questions about that (the above was in response to you saying
that typing f and i didn't produce any ligatures on your terminal).

Here's the patch I suggest to try:

diff --git a/lisp/international/latin1-disp.el 
b/lisp/international/latin1-disp.el
index 96a54cc..1f639ed 100644
--- a/lisp/international/latin1-disp.el
+++ b/lisp/international/latin1-disp.el
@@ -764,12 +764,11 @@ latin1-display-ucs-per-lynx
 isn't changed if the display can render Unicode characters."
   (interactive "p")
   (if (> arg 0)
-      (unless (char-displayable-p #x101) ; a with macron
-       ;; It doesn't look as though we have a Unicode font.
-       (let ((latin1-display-format "%s"))
-         (mapc
-          (lambda (l)
-            (apply 'latin1-display-char l))
+      (let ((latin1-display-format "%s"))
+       (mapc
+        (lambda (l)
+           (or (char-displayable-p (car l))
+              (apply 'latin1-display-char l)))
           ;; Table derived by running Lynx on a suitable list of
           ;; characters in a utf-8 file, except for some added by
           ;; hand at the end.
@@ -3183,7 +3182,7 @@ latin1-display-ucs-per-lynx
             (?\、 ",")
             ;; Not from Lynx
             (? "")
-            (?� "?")))))
+            (?� "?"))))
     (aset standard-display-table
          (make-char 'mule-unicode-0100-24ff) nil)
     (aset standard-display-table



reply via email to

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