bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#31149: 27.0.50; (gui-get-selection nil 'text/html) returns mis-decod


From: Eli Zaretskii
Subject: bug#31149: 27.0.50; (gui-get-selection nil 'text/html) returns mis-decoded text
Date: Sun, 29 Sep 2019 13:21:13 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: monnier@IRO.UMontreal.CA,  31149@debbugs.gnu.org
> Date: Sun, 29 Sep 2019 12:02:42 +0200
> 
> (defun ewp-yank-html ()
> 
> [...]
> 
>   (let ((data (loop for type in '(PRIMARY CLIPBOARD)
>                   for data = (x-get-selection-internal type 'text/html)
> 
> [...]
> 
>       ;; Somehow the selection is UTF-16 when selecting text in
>       ;; Firefox.
>       (decode-coding-string data 'utf-16-le)

And you do that for _every_ text you get from the clipboard?  Or do
you have some means of detecting those selected in Firefox?

In general, if the text is already decoded, I don't expect this extra
decoding to do anything bad, does it?





reply via email to

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