How to change UCS-2 LE to UTF-8

Dear All,

I use filebeat to get a log file to logstash. The log is encoded with UCS-2 LE. I tried to change to UTF-8 but fail. Anyone can help? The following is my logstash config for reference.

input {
beats {
port => 5047
tags => "filebeat"
codec => plain { charset=>"UTF-8" }


The charset on the codec has to match what the encoding on the file is. I am not familiar with the BE/LE distinction in UCS, but the codec should accept charset => UCS-2BE. Does that help?

I will try. I want to know if I want to change to UTF-8, is the configuration correct?

Internally, it's Java, so the charset will be UTF-16. You can set the codec on the input and output to be whatever you need.

I am guessing that BE/LE is big-endian/little-endian. I do not understand UTF well enough to see why BE/LE is a thing for UCS-4, but not for UCS-2.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.