# Ansi encoding for output of logstash

**URL:** <https://discuss.elastic.co/t/ansi-encoding-for-output-of-logstash/246014>\
**Category:** Logstash\
**Created:** [August 23, 2020, 11:04am UTC](https://discuss.elastic.co/t/ansi-encoding-for-output-of-logstash/246014 "2020-08-23T11:04:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [August 23, 2020, 11:04am UTC](https://discuss.elastic.co/t/ansi-encoding-for-output-of-logstash/246014/1 "2020-08-23T11:04:41Z")

</div>

Hi all,  
I want to save data as a txt file based on the ansi encoding using logstash. Logstash output is as following which ANSI\_X3.4-1968 codec is used to encode output in Ansi. But, when i check the encoding of data20200823.txt file using notepad, it seems it is UTF-8. how can i save output in Ansi encoding? any advise will be so appreciated.

```
output {
csv {
fields => ["My_Data"]
path => "D:\My_data\data20200823.txt"
codec => plain{ charset=>"ANSI_X3.4-1968" }

}
  stdout { codec => rubydebug }

}
```

---

<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:** [September 20, 2020, 11:04am UTC](https://discuss.elastic.co/t/ansi-encoding-for-output-of-logstash/246014/2 "2020-09-20T11:04:58Z")

</div>

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