Closed truls closed 5 years ago
Unfortunately only one default can be chosen, and as the saying goes, "You can only please some of the people some of the time..."
Having a default which corrupts binary files makes absolutely no sense. In any case, there needs to be a big fat warning in the docs about this.
You got it.
Hi,
I just encountered a rather elusive bug which caused binary files (PDFs) to occasionally get corrupted due to an encoding issue.
The problem seems to be that
request.el
(at least when using the CURL backend) defaults to decoding downloaded data as UTF-8. To me, this seems counter intuitive as I would expect the library to return raw unmodified data and leave the decoding up to the user or, alternatively, decode according to thecontent-type
header.In the past, it seems that this was the case. Why was it changed? https://github.com/tkf/emacs-request/commit/258c6bf3729eff72aaeb169b4d06f050e8eea565
For now, I'm working around my issue by specifying
:encoding 'no-conversion
in my requests.