From: Giuseppe Bilotta Date: Fri, 22 Dec 2017 09:07:37 +0000 (+0100) Subject: Open files in binary mode X-Git-Url: http://git.oblomov.eu/rcs-fast-export/commitdiff_plain Open files in binary mode This should fix GitHub issue #4. Additionally, opening in binary mode already forces the ASCII-8BIT encoding, so there's no need to specify it anymore. --- diff --git a/rcs-fast-export.rb b/rcs-fast-export.rb index f5e5ad2..4128335 100755 --- a/rcs-fast-export.rb +++ b/rcs-fast-export.rb @@ -392,7 +392,7 @@ module RCS def RCS.parse(fname, rcsfile, opts={}) rcs = RCS::File.new(fname, ::File.executable?(rcsfile)) - ::File.open(rcsfile, 'r:ASCII-8BIT') do |file| + ::File.open(rcsfile, 'rb') do |file| status = [:basic] rev = nil lines = []