# How to read UTF-16LE encoded CSV files using file input plugin

**URL:** <https://discuss.elastic.co/t/how-to-read-utf-16le-encoded-csv-files-using-file-input-plugin/370765>\
**Category:** Logstash\
**Created:** [November 19, 2024, 12:53pm UTC](https://discuss.elastic.co/t/how-to-read-utf-16le-encoded-csv-files-using-file-input-plugin/370765 "2024-11-19T12:53:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkatkumar229](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatkumar229/32/104663_2.png) [@venkatkumar229](https://discuss.elastic.co/u/venkatkumar229)\
**Post date:** [November 19, 2024, 12:53pm UTC](https://discuss.elastic.co/t/how-to-read-utf-16le-encoded-csv-files-using-file-input-plugin/370765/1 "2024-11-19T12:53:28Z")

</div>

Hi Team,

I wanted to read the CSV files which are encoded in UTF-16LE or UTF-8 in logstash. Could you please help me how i can achieve it. I have tried like this which is failing.

```auto
input {
  file {
     id => "nasapmena-orders-input"
     path => "/data/Elastic/logstash/Orders_20241113142312.csv"
     mode => "read"
     codec => plain { charset=>"UTF-8" }
        }
}

```

---

<div class="post-metadata">

**Author:** ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)\
**Post date:** [November 19, 2024, 3:17pm UTC](https://discuss.elastic.co/t/how-to-read-utf-16le-encoded-csv-files-using-file-input-plugin/370765/2 "2024-11-19T15:17:40Z")

</div>

Thanks for reaching out, @venkatkumar229. Would something like this work for you:

```auto
input {
  file {
    path => "/data/Elastic/logstash/Orders_20241113142312.csv"
    start_position => "beginning"
    sincedb_path => "/dev/null" 
    codec => plain {
      charset => "UTF-16LE"
    }
  }
}

```

This example includes `start_position => "beginning"` to ensure that that logstash always starts reading at the beginning of the file and `sincedb_path => "/dev/null"` for testing purposes so Logstash will ignore what files have been processed in previous runs.
