# Logstash and codec =\> "Windows-1251" bug?

**URL:** <https://discuss.elastic.co/t/logstash-and-codec-windows-1251-bug/69798>\
**Category:** Logstash\
**Created:** [December 22, 2016, 1:53pm UTC](https://discuss.elastic.co/t/logstash-and-codec-windows-1251-bug/69798 "2016-12-22T13:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiVong](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@LiVong](https://discuss.elastic.co/u/LiVong)\
**Post date:** [December 22, 2016, 1:53pm UTC](https://discuss.elastic.co/t/logstash-and-codec-windows-1251-bug/69798/1 "2016-12-22T13:53:32Z")

</div>

Good time of the day.  
Try to configure ELK for some system, where parsing logs throw filebeat and recive some problem. I am new in ELK, so may be I am just make some stupid mistake.

I have some logs in Windows-1251 encoding. I configured filebeat with encoding

[spoiler] paths:  
- C:\DIS-DAS\_Logs\*.txt  
document\_type: DAS\_log  
encoding: Windows-1251  
scan\_frequency: 10s

#----------------------------- Logstash output --------------------------------  
output.logstash:  
hosts: ["127.0.0.1:5044"]  
[/spoiler]

And input in Logstash

beats {   
port =\> 5044   
codec =\> plain {charset =\> "Windows-1251"}   
}

But message from Logstash in bad encoding.  
I try to send log from filebeat directly to Elasticsearch

#-------------------------- Elasticsearch output ------------------------------  
output.elasticsearch:  
hosts: ["127.0.0.1:9200"]

And everything work normal. My Logstash configuration is bad or something else?

---

<div class="post-metadata">

**Author:** ![LiVong](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@LiVong](https://discuss.elastic.co/u/LiVong)\
**Post date:** [December 23, 2016, 12:15pm UTC](https://discuss.elastic.co/t/logstash-and-codec-windows-1251-bug/69798/2 "2016-12-23T12:15:52Z")

</div>

Solved.  
Set

encoding: CP1251  
in filebeat.yml, and everything works OK. Bad communication with logstash in 'Windows-1251' name?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 20, 2017, 12:15pm UTC](https://discuss.elastic.co/t/logstash-and-codec-windows-1251-bug/69798/3 "2017-01-20T12:15:59Z")

</div>

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