# Character encoding problems Filebeat & Logstash

**URL:** <https://discuss.elastic.co/t/character-encoding-problems-filebeat-logstash/150353>\
**Category:** Logstash\
**Created:** [September 28, 2018, 1:47pm UTC](https://discuss.elastic.co/t/character-encoding-problems-filebeat-logstash/150353 "2018-09-28T13:47:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [September 28, 2018, 5:11pm UTC](https://discuss.elastic.co/t/character-encoding-problems-filebeat-logstash/150353/2 "2018-09-28T17:11:57Z")

</div>

Maybe the windows files are in a Microsoft encoding?

I can't say for filebeat, but charset setting in a codec is a **`from`** setting, meaning that, say you have a file in CP1252 encoding (Windows) and Logstash/Elasticsearch must have and expects UTF8 then you set the charset setting to "CP1252".

Here you are saying, "I know I have X encoding so please convert it to UTF8".

A few people have tried "universal string encoding detection" of an arbitrary piece of text but most have failed because the confidence level of the detection is a function of string length and the number of occurrences of multi-byte sequences.

So Logstash does not know what the source charset of the input data is. You can try ASCII\_8BIT because then LS will force encode to UTF8 and will replace any illegal UTF8 sequences with a � character.

---

_[View the full topic](https://discuss.elastic.co/t/character-encoding-problems-filebeat-logstash/150353)._
