all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: omar.antolin@gmail.com
Cc: 30664@debbugs.gnu.org
Subject: bug#30664: 25.2; eww-download corrupts PDF files (and probably other binary files too)
Date: Thu, 01 Mar 2018 18:10:34 +0100	[thread overview]
Message-ID: <mvmh8pzsovp.fsf@suse.de> (raw)
In-Reply-To: <86muzrdbyx.fsf@gmail.com> (omar antolin's message of "Thu, 01 Mar 2018 09:58:30 -0600")

On Mär 01 2018, omar.antolin@gmail.com wrote:

> I tried using eww-download (bound to `d` in eww buffers) to download a
> PDF file. This produced, as expected a file in my downloads directory,
> but I could not open it in my PDF reader. I immediately suspected that
> Emacs had done some unwanted coding system translation on the PDF file.
>
> The variable `last-coding-system-used` was set to `raw-text-dos` (I'm
> using Emacs 25.2 on Windows 10), and the `dos` part sounded suspicious
> to me. Adding the item `("\\.pdf\\'" no-conversion . no-conversion)` to
> the variable `file-coding-system-alist` and redownloading the file fixed
> the problem and produced a valid PDF file.
>
> I'm not sure adding that entry to the default value of
> `file-coding-system-alist` is the right way to solve this problem
> though, because where does it stop? Would we add all known binary file
> types to the list with `no-conversion` specifications?

I think it's only a problem because PDF files look like text files.
Other binary files are immediately recognized as binary.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





  reply	other threads:[~2018-03-01 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 15:58 bug#30664: 25.2; eww-download corrupts PDF files (and probably other binary files too) omar.antolin
2018-03-01 17:10 ` Andreas Schwab [this message]
2018-03-01 19:18   ` Eli Zaretskii
2018-03-01 19:17 ` Eli Zaretskii
     [not found]   ` <CAL03oyLjOiFtdiY+_OCHHSSzn+7iEepZAHq08fOvMiN2HhLpqQ@mail.gmail.com>
2018-03-02  8:46     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvmh8pzsovp.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=30664@debbugs.gnu.org \
    --cc=omar.antolin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.