nnicandro / emacs-zmq

Emacs bindings to ØMQ
GNU General Public License v2.0
49 stars 18 forks source link

zmq-load: correctly handle binary data #31

Closed slippycheeze closed 3 years ago

slippycheeze commented 3 years ago

Set the buffer, and process I/O, coding systems to handle binary data correctly while downloading pre-built modules.

The most important part is the process coding system handling in the hand-written URL download functions. Without that there will be corruption on any platform where line endings are modified by default, and binary data is accessed.

This is only required, of course, using external processes to download content into the buffer. The url package handles encoded data correctly without help.

Setting the buffer unibyte is not strictly required, as the current set of functions that interact with it are safe. This avoids the risk that the content will be misinterpreted as a text encoding later.

This fixes #15 and https://github.com/nnicandro/emacs-jupyter/issues/214

nnicandro commented 3 years ago

Thanks for this!