Commit 49ef3f5da97134b2ac2caf2eeedfe6aa070b19d8
1 parent
a14d4912
Exists in
master
and in
27 other branches
doc: force reading textile files as UTF-8
This fixes building the docs with Ruby 2.0+
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/tasks/doc.rake
@@ -26,7 +26,8 @@ namespace :noosfero do | @@ -26,7 +26,8 @@ namespace :noosfero do | ||
26 | begin | 26 | begin |
27 | require 'redcloth' | 27 | require 'redcloth' |
28 | File.open(output ,'w') do |output_file| | 28 | File.open(output ,'w') do |output_file| |
29 | - output_file.write(RedCloth.new(File.read(input)).to_html) | 29 | + text = File.read(input, encoding: Encoding::UTF_8) |
30 | + output_file.write(RedCloth.new(text).to_html) | ||
30 | puts "#{input} -> #{output}" | 31 | puts "#{input} -> #{output}" |
31 | end | 32 | end |
32 | rescue Exception => e | 33 | rescue Exception => e |