Skip to content

Commit

Permalink
add the magic header encoding: utf-8 in the string interpolation to b…
Browse files Browse the repository at this point in the history
…e sure all is utf-8

Fixes #3718
  • Loading branch information
Pere Urbon-Bayes authored and jordansissel committed Aug 17, 2015
1 parent f271391 commit 2b6485f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/logstash/string_interpolation.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require "thread_safe"
require "forwardable"

Expand Down Expand Up @@ -108,7 +110,7 @@ def evaluate(event)

case value
when nil
"%{#{@key}}".encode(Encoding::UTF_8)
"%{#{@key}}"
when Array
value.join(",")
when Hash
Expand Down

0 comments on commit 2b6485f

Please sign in to comment.