On Wed, 15 May 2019 at 03:42, Eli Zaretskii wrote: > > From: Richard Copley > > Date: Tue, 14 May 2019 23:26:27 +0100 > > Cc: 35739@debbugs.gnu.org > > > > Thanks, that seems to be it: the attached patch gets rid of the bug (but > obviously isn't TRT). > > > > diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el > > index e35d999e0f..f8af2ce88c 100644 > > --- a/lisp/url/url-handlers.el > > +++ b/lisp/url/url-handlers.el > > @@ -334,11 +334,11 @@ url-insert-buffer-contents > > (when replace > > (delete-region (point-min) start) > > (delete-region (point) (point-max))) > > - (unless (cadr size-and-charset) > > - ;; If the headers don't specify any particular charset, use the > > - ;; usual heuristic/rules that we apply to files. > > - (decode-coding-inserted-region (point-min) (point) url > > - visit beg end replace)) > > + ;; (unless (cadr size-and-charset) > > + ;; ;; If the headers don't specify any particular charset, use > the > > + ;; ;; usual heuristic/rules that we apply to files. > > + ;; (decode-coding-inserted-region (point-min) (point) url > > + ;; visit beg end replace)) > > (let ((inserted (car size-and-charset))) > > (when (fboundp 'after-insert-file-set-coding) > > (let ((insval (after-insert-file-set-coding inserted visit))) > > I don't see how disabling decoding could make sense, can you explain? > Not in detail, it's not an area of expertise of mine. We call (decode-coding-region (point-min) (point-max) 'undecided) on the payload of "https://elpa.gnu.org/packages/archive-contents", which is raw text. The resulting buffer's buffer-file-coding- system is iso-latin-1-dos. > > What does this code do on GNU/Linux? > The same. The resulting coding system is iso-latin-1-unix.