henrikpersson / rsub

Use rmate with Sublime Text.
459 stars 70 forks source link

Better handling of encoding/decoding Unicode strings. #26

Closed codeman38 closed 11 years ago

codeman38 commented 11 years ago

This patch modifies the code so that all socket writes/reads are done in binary mode, with decoding/encoding only occurring when transmitting metadata to/from the socket. This ensures that the contents of the file itself are transmitted completely verbatim, preventing a potential exception and/or data corruption if the contents are not plain ASCII.

As a side effect, this change also fixes a hang which would occur if a file on the remote system contained CR+LF line endings.

henrikpersson commented 11 years ago

Cool beans! Thank you.