# Logstash: Issue with Encode Windows-1252

**URL:** <https://discuss.elastic.co/t/logstash-issue-with-encode-windows-1252/174333>\
**Category:** Logstash\
**Tags:** elastic-stack-monitoring\
**Created:** [March 28, 2019, 12:40pm UTC](https://discuss.elastic.co/t/logstash-issue-with-encode-windows-1252/174333 "2019-03-28T12:40:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvn\_sreedhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pvn_sreedhar/32/42980_2.png) [@pvn\_sreedhar](https://discuss.elastic.co/u/pvn_sreedhar)\
**Post date:** [March 28, 2019, 12:40pm UTC](https://discuss.elastic.co/t/logstash-issue-with-encode-windows-1252/174333/1 "2019-03-28T12:40:10Z")

</div>

Hi ,  
I am facing an issue with Logstash to a read a file.  
Original data in the file: r8Dà - contains uni-code characters.  
When read the file in python with the options - (encoding='Windows-1252', errors="surrogateescape")  
With these options, able to get the expected output - 'r8D\udc81\x08à€\x04\n'

But in Logstash with encoding 'Windows-1252', getting different output (23r8Dà€).

Please let us know how to apply errors="surrogateescape" along with encode "Windows-1252" in logstash to get expected output.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![pvn\_sreedhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pvn_sreedhar/32/42980_2.png) [@pvn\_sreedhar](https://discuss.elastic.co/u/pvn_sreedhar)\
**Post date:** [April 1, 2019, 10:13am UTC](https://discuss.elastic.co/t/logstash-issue-with-encode-windows-1252/174333/2 "2019-04-01T10:13:13Z")

</div>

Hi, I would like to follow up.  
Best Regards,  
Sreedhar

---

<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:** [April 29, 2019, 10:13am UTC](https://discuss.elastic.co/t/logstash-issue-with-encode-windows-1252/174333/3 "2019-04-29T10:13:15Z")

</div>

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