Skip to content

Commit

Permalink
solve issue when messages contain UTF-8 (CJK)
Browse files Browse the repository at this point in the history
wrong messages
    "msg\":\"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\"

fix the messages after add io.set_encoding(Encoding::ASCII_8BIT)
   "msg":"你好"
  • Loading branch information
hc-chien authored Aug 1, 2019
1 parent 9b17037 commit 9aff79e
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 9aff79e

Please sign in to comment.