Subject: Re: bug#44338: 27.1; EWW can't download and view pdf

From: "Basil L. Contovounesios" <[email-masked]>
Date: Wed, 04 Nov 2020 20:01:15 +0000

Eli Zaretskii <[email-masked]> writes:

> In any case, this isn't right:
>
>   (defun eww-display-pdf ()
>     (let ((data (buffer-substring (point) (point-max))))
>       (pop-to-buffer-same-window (get-buffer-create "*eww pdf*"))
>       (let ((coding-system-for-write 'raw-text)  <<<<<<<<<<<<<<<<<<<<<<
> 	    (inhibit-read-only t))
> 	(erase-buffer)
> 	(insert data)
> 	(mailcap-view-mime "application/pdf")))
>     (goto-char (point-min)))
>
> We should use 'raw-text-unix here, since the buffer contents is a
> stream of raw bytes.

Thanks, I've made the change in my patch, and will push in a few days if
I don't hear otherwise.

-- 
Basil