# Logstash input codec charset not working

**URL:** https://discuss.elastic.co/t/logstash-input-codec-charset-not-working/159375
**Category:** Logstash
**Created:** [December 4, 2018, 2:03pm UTC](https://discuss.elastic.co/t/logstash-input-codec-charset-not-working/159375 "2018-12-04T14:03:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Francois1](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@Francois1](https://discuss.elastic.co/u/Francois1)
#### Post date: [December 4, 2018, 2:03pm UTC](https://discuss.elastic.co/t/logstash-input-codec-charset-not-working/159375/1 "2018-12-04T14:03:44Z")

</div>

Hi,

I send a message to Logstash (6.1.1) in json format and in ISO-8859-1 encoding (unfortunatly I can't change the encoding).  
Logstash is configured with an http input with a codec option like that :

```auto
input {
    http {
        codec => plain {
          charset => "ISO-8859-1"
        }
        port => 5002
        ssl => false
    }
}

```

But it seems that Logstash always considers that the encoding is UTF-8 as the logs errors suggest :

```auto
[2018-12-04T14:41:36,464][WARN][logstash.codecs.json] Received an event that has a different character encoding than you configured. {:text=>.... expected_charset=>"UTF-8"}
[2018-12-04T14:41:36,465][ERROR][logstash.codecs.json] JSON parse error, original data now in message field {:error=>#<LogStash::Json::ParserError: Unexpected character ('\' (code 92)): was expecting double-quote to start field name
 at [Source: (String)"{\

```

Can anyone help me solving that ?

Thanks for reading

---

<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 1, 2019, 2:03pm UTC](https://discuss.elastic.co/t/logstash-input-codec-charset-not-working/159375/2 "2019-01-01T14:03:45Z")

</div>

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