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 12:31:58 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 29 Sep 2019 10:44:48 +0200
> Cc: 31149@debbugs.gnu.org
> 
> >     if (html != None && sel_type == html) {
> >     /* if the buffer contains UCS-2 (UTF-16), convert to
> >      * UTF-8.  Mozilla-based browsers do this for the
> >      * text/html target.
> >      */
> >     [...]
> >
> > and according to the subsequent code it's not even always the
> > same endianness.
> 
> I think it would make sense for us to do the same here.  It should be
> easy enough for us to detect that the string is utf-16, I think?

I think you want to use auto-coding-regexp-alist-lookup.

> The data has a BOM

Does it?  It doesn't have to, at least not in principle.





reply via email to

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