diff options
-rw-r--r-- | template/unicode_norm_gen.tmpl | 2 | ||||
-rwxr-xr-x | tool/enc-unicode.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/template/unicode_norm_gen.tmpl b/template/unicode_norm_gen.tmpl index 161f23e5e7..c8d697cb34 100644 --- a/template/unicode_norm_gen.tmpl +++ b/template/unicode_norm_gen.tmpl @@ -66,7 +66,7 @@ class Array end # read the file 'CompositionExclusions.txt' -composition_exclusions = vpath.open("#{InputDataDir}/CompositionExclusions.txt") {|f| +composition_exclusions = vpath.open("#{InputDataDir}/CompositionExclusions.txt", 'rb') {|f| base = Regexp.quote(File.basename(f.path, '.*')) ext = Regexp.quote(File.extname(f.path)) version = (line = f.gets)[/^# *#{base}-([\d.]+)#{ext}\s*$/, 1] or diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb index e7b979a639..83bbe352e1 100755 --- a/tool/enc-unicode.rb +++ b/tool/enc-unicode.rb @@ -281,7 +281,7 @@ def data_foreach(name, &block) fn = get_file(name) warn "Reading #{name}" pat = /^# #{name.sub(/\./, '-([\\d.]+)\\.')}/ - File.open(fn) do |f| + File.open(fn, 'rb') do |f| line = f.gets unless pat =~ line raise ArgumentError, "#{name}: no Unicode version" |