From f888b2812f6db02ca6e543913321008766434f32 Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Thu, 21 Jan 2016 10:06:18 +0100 Subject: [PATCH] Template: force encoding utf-8 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. --- lib/run_loop/template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/run_loop/template.rb b/lib/run_loop/template.rb index bdefa8f8..257b0b9f 100644 --- a/lib/run_loop/template.rb +++ b/lib/run_loop/template.rb @@ -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