From 49ef3f5da97134b2ac2caf2eeedfe6aa070b19d8 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 9 Mar 2015 16:08:07 -0300 Subject: [PATCH] doc: force reading textile files as UTF-8 --- lib/tasks/doc.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tasks/doc.rake b/lib/tasks/doc.rake index 8644bad..204a0ab 100644 --- a/lib/tasks/doc.rake +++ b/lib/tasks/doc.rake @@ -26,7 +26,8 @@ namespace :noosfero do begin require 'redcloth' File.open(output ,'w') do |output_file| - output_file.write(RedCloth.new(File.read(input)).to_html) + text = File.read(input, encoding: Encoding::UTF_8) + output_file.write(RedCloth.new(text).to_html) puts "#{input} -> #{output}" end rescue Exception => e -- libgit2 0.21.2