# What charset to use?

**URL:** <https://discuss.elastic.co/t/what-charset-to-use/34722>\
**Category:** Logstash\
**Created:** [November 16, 2015, 7:12pm UTC](https://discuss.elastic.co/t/what-charset-to-use/34722 "2015-11-16T19:12:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fares/32/45311_2.png) [@fares](https://discuss.elastic.co/u/fares)\
**Post date:** [November 16, 2015, 7:12pm UTC](https://discuss.elastic.co/t/what-charset-to-use/34722/1 "2015-11-16T19:12:13Z")

</div>

Hi,

Im trying to read non UTF-8 file, it's IBM 500 file but i can't find  
it in the charset list provided with the plugin so i tried "US-ASCII".

Here is my config file:

input{

```
       file {

            path =>...

            sincedb_path => "/dev/null"

            codec => plain{charset =>"US-ASCII"}

            start_position => "beginning"

            }

    }

```

output{stdout{}}

It doesn't work.

What i don't understand is that i don't have any error message, logstash starts and does nothing.

on my terminal i have only this message : "Logstash startup completed"

Any help please ?

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 16, 2015, 8:07pm UTC](https://discuss.elastic.co/t/what-charset-to-use/34722/2 "2015-11-16T20:07:43Z")

</div>

With `sincedb_path` set to /dev/null and `start_position` set to "beginning" Logstash should indeed unconditionally read the file from the beginning. Increasing the logging verbosity by starting Logstash with `--verbose` or even `--debug` could give more clues about what it's doing. One possibility is that the Logstash process doesn't have permission to read the file, or that there's a typo in the filename or filename pattern.

---

<div class="post-metadata">

**Author:** ![fares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fares/32/45311_2.png) [@fares](https://discuss.elastic.co/u/fares)\
**Post date:** [November 17, 2015, 9:00am UTC](https://discuss.elastic.co/t/what-charset-to-use/34722/3 "2015-11-17T09:00:24Z")

</div>

Thanks for your reply.

Logstash didn't do anything cause the encoded file was considered as a single line, so i added CR end of line and now it displays characters like these "����@@@@"

i tried almost all the charset values available here [https://www.elastic.co/guide/en/logstash/current/plugins-codecs-plain.html](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-plain.html)

It doesn't seem to work.  
With talend i can decode the file with IBM500 charset but it's not available in plain codec.

Any help please to do it with logstash ?

---

<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:** [July 6, 2017, 5:22am UTC](https://discuss.elastic.co/t/what-charset-to-use/34722/4 "2017-07-06T05:22:35Z")

</div>


