ruby-changes:42058
From: nobu <ko1@a...>
Date: Wed, 16 Mar 2016 23:51:43 +0900 (JST)
Subject: [ruby-changes:42058] nobu:r54132 (trunk): transcode-tblgen.rb: binary mode
nobu 2016-03-16 23:51:40 +0900 (Wed, 16 Mar 2016) New Revision: 54132 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54132 Log: transcode-tblgen.rb: binary mode * tool/transcode-tblgen.rb (citrus_decode_mapsrc): read in binary mode to deal with non-ascii characters. Modified files: trunk/tool/transcode-tblgen.rb Index: tool/transcode-tblgen.rb =================================================================== --- tool/transcode-tblgen.rb (revision 54131) +++ tool/transcode-tblgen.rb (revision 54132) @@ -725,7 +725,7 @@ def citrus_decode_mapsrc(ces, csid, maps https://github.com/ruby/ruby/blob/trunk/tool/transcode-tblgen.rb#L725 path << ".src" path[path.rindex('/')] = '%' STDERR.puts 'load mapsrc %s' % path if VERBOSE_MODE - open(path) do |f| + open(path, 'rb') do |f| f.each_line do |l| break if /^BEGIN_MAP/ =~ l end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/