I have a csv file with some of the fields in Portuguese.
In the input of logstash I wrote: codec => plain { charset=>"UTF-8" }
I am getting the following warnings:
[2019-02-16T14:38:25,876][WARN ][logstash.codecs.plain ] Received an event that has a different character encoding than you configured. {:text=>"INC000569147,Designado,COPM do Brasil,Produ\\xE7\\xE3o,Triagem Back End,2019-01-21 07:00:38,,,,\\r", :expected_charset=>"UTF-8"}
I tried to solve it in the filter with ruby:
ruby {
code => "
unless (event.get('Classification').to_s).nil?
event.set('Classification', ((event.get('Classification')).to_s).force_encoding('ISO-8859-1'))
end
unless (event.get('Organization Support Group').to_s).nil?
event.set('Organization Support Group', ((event.get('Organization Support Group')).to_s).force_encoding('ISO-8859-1'))
end
unless (event.get('Designated Group').to_s).nil?
event.set('Designated Group', ((event.get('Designated Group')).to_s).force_encoding('ISO-8859-1'))
end
"
}
but I am still getting the same warnings.
Any better Idea how to solve it?
Regards,
Sharon.