Can't parse ANSI encoded files using inputs.tail plugin

I’m using telegraf to parse log files with the inputs.tail plugin and some grok patterns.

I noticed that I could process the logs when they were encoded as UTF8, but grok doesn’t find my matches when the logs are encoded as ANSI.

For the moment, I don’t consider changing the logs encoding to UTF8 externally. Is there any way to parse them as ANSI directly ? If it’s not possible, is there a way to preprocess the logs before calling inputs.tail ? I would eventually be able to call a Powershell script to convert the lines to UTF8, but I’m not sure if it’s the way to go.

Any hints would be appreciated ! Thanks

OK I ended up patching ./plugins/common/encoding/decoder.go and added Windows 1252 manually in order to support non UTF8 input logs

Glad you got it working.

Would you be willing to share your patch and/or put up a PR for us to take a look at and consider including?