[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: |
Lars Ingebrigtsen |
Subject: |
bug#31149: 27.0.50; (gui-get-selection nil 'text/html) returns mis-decoded text |
Date: |
Sun, 29 Sep 2019 13:48:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> ;; 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 this package, I'm assuming all the text comes from Firefox because
that's what I use. :-)
> In general, if the text is already decoded, I don't expect this extra
> decoding to do anything bad, does it?
That's true, so perhaps this isn't a problem:
(decode-coding-string "fóo" 'utf-16-le)
=> "fóo"
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no