Permalink
Browse files

enforce utf8

  • Loading branch information...
1 parent fcfc5d2 commit c7272d03ee565788dfaf1cb02e6e1f927d6eb491 @manno manno committed Apr 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/static_program_export.rb
@@ -87,8 +87,8 @@ def save_response(filename)
document.write_html_to(f, :encoding => "UTF-8")
end
else
- File.open(file_path, "w") do |f|
- f.write(@session.response.body)
+ File.open(file_path, "w:utf-8") do |f|
+ f.write(@session.response.body.encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "?"))
end
end
end

0 comments on commit c7272d0

Please sign in to comment.