From 5d9e77d5934c29acb07f17159f0b41fab1ba3877 Mon Sep 17 00:00:00 2001 From: HC CHIEN <44664191+hc-chien@users.noreply.github.com> Date: Thu, 1 Aug 2019 17:04:38 +0800 Subject: [PATCH] solve issue when messages contain UTF-8 (CJK) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix encoding problem from: "msg":"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" to: "msg":"你好" Signed-off-by: hc.chien --- lib/fluent/plugin/out_exec_filter.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fluent/plugin/out_exec_filter.rb b/lib/fluent/plugin/out_exec_filter.rb index 2dec7997dd..7f62eee109 100644 --- a/lib/fluent/plugin/out_exec_filter.rb +++ b/lib/fluent/plugin/out_exec_filter.rb @@ -284,6 +284,7 @@ def write(chunk) end def run(io) + io.set_encoding(Encoding::ASCII_8BIT) case when @parser.implement?(:parse_io) @parser.parse_io(io, &method(:on_record))