Skip to content

Commit

Permalink
solve issue when messages contain UTF-8 (CJK)
Browse files Browse the repository at this point in the history
fix encoding problem

from:
  "msg":"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
to:
  "msg":"你好"

Signed-off-by: hc.chien <[email protected]>
  • Loading branch information
hc-chien committed Aug 5, 2019
1 parent 9b17037 commit 5d9e77d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fluent/plugin/out_exec_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5d9e77d

Please sign in to comment.