diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/ruby/base/tex.rb | 8 | ||||
-rw-r--r-- | scripts/context/ruby/base/texutil.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb index 4a60ad4c1..23db7f1e8 100644 --- a/scripts/context/ruby/base/tex.rb +++ b/scripts/context/ruby/base/tex.rb @@ -894,7 +894,7 @@ class TEX def scantexpreamble(filename) begin - if FileTest.file?(filename) and tex = File.open(filename) then + if FileTest.file?(filename) and tex = File.open(filename,'rb') then bomdone = false while str = tex.gets and str.chomp! do unless bomdone then @@ -940,7 +940,7 @@ end end def scantexcontent(filename) - if FileTest.file?(filename) and tex = File.open(filename) then + if FileTest.file?(filename) and tex = File.open(filename,'rb') then while str = tex.gets do case str.chomp when /^\%/o then @@ -1075,7 +1075,7 @@ end end def checkxmlfile(rawname) - if FileTest.file?(rawname) && (xml = File.open(rawname)) then + if FileTest.file?(rawname) && (xml = File.open(rawname,'rb')) then xml.each do |line| case line when /<\?context\-directive\s+(\S+)\s+(\S+)\s+(\S+)\s*(.*?)\s*\?>/o then @@ -2011,7 +2011,7 @@ end end if true then # autopurge begin - File.open(File.suffixed(rawbase, 'tuo')) do |f| + File.open(File.suffixed(rawbase, 'tuo'),'rb') do |f| ok = 0 f.each do |line| case ok diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb index 3775469ed..868e3ca16 100644 --- a/scripts/context/ruby/base/texutil.rb +++ b/scripts/context/ruby/base/texutil.rb @@ -1028,7 +1028,7 @@ class TeXUtil tuifile = File.suffixed(filename,'tui') if FileTest.file?(tuifile) then report("parsing file #{tuifile}") - if f = open(tuifile) then + if f = File.open(tuifile,'rb') then f.each do |line| case line.chomp when /^f (.*)$/o then @plugins.reader('MyFiles', $1.splitdata) |