GNU bug report logs -
#31149
27.0.50; (gui-get-selection nil 'text/html) returns mis-decoded text
Previous Next
Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Date: Fri, 13 Apr 2018 20:56:02 UTC
Severity: normal
Found in version 27.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 31149 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Ah, thanks. So should I go ahead and make this change? It looks pretty
>> trivial, but I guess there could be interop problems with code that
>> assumes the current odd behaviour.
>
> What odd behavior is that? I understood that we just display binary
> garbage, something that no one should miss.
We don't have any commands to yank HTML, so we don't display anything,
but I've got code like the following in one of my out-of-tree packages
(which will fail after the fix). I'm with that, though, but I have no
idea how much other people would be impacted.
(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)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.