mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- fix unicode bug found by tcp input tests;
Now: always force the charset, but only convert if it's not UTF-8
This commit is contained in:
parent
648c3834d4
commit
8de740e17a
1 changed files with 1 additions and 1 deletions
|
@ -83,9 +83,9 @@ class LogStash::Inputs::Base < LogStash::Plugin
|
|||
|
||||
case @format
|
||||
when "plain"
|
||||
raw.force_encoding(@charset)
|
||||
if @charset != "UTF-8"
|
||||
# Convert to UTF-8 if not in that character set.
|
||||
raw.force_encoding(@charset)
|
||||
raw = raw.encode("UTF-8", :invalid => :replace, :undef => :replace)
|
||||
end
|
||||
event.message = raw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue