Skip to content

Commit

Permalink
Template: force encoding utf-8
Browse files Browse the repository at this point in the history
File.read always returns US-ASCII; every read must force utf-8

Pass all  calls through utf-8 filter #230

@svevang - thought you would like to know.
  • Loading branch information
jmoody committed Jan 21, 2016
1 parent 9b43011 commit f888b28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/run_loop/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class UIAScriptTemplate < ERB
# @!visibility private
def initialize(template_root, template_relative_path)
@template_root = template_root
@template = File.read(File.join(@template_root, template_relative_path))
@template = File.read(File.join(@template_root, template_relative_path)).force_encoding("utf-8")
super(@template)
end

Expand Down

0 comments on commit f888b28

Please sign in to comment.