# Codec Error

**URL:** https://discuss.elastic.co/t/codec-error/168511
**Category:** Logstash
**Created:** [February 15, 2019, 4:15am UTC](https://discuss.elastic.co/t/codec-error/168511 "2019-02-15T04:15:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ssasporta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ssasporta/32/13695_2.png) [@ssasporta](https://discuss.elastic.co/u/ssasporta)
#### Post date: [February 15, 2019, 4:15am UTC](https://discuss.elastic.co/t/codec-error/168511/1 "2019-02-15T04:15:14Z")

</div>

How do I codec Portuguese strings?

I am getting the following warning in logstash:

019-02-15T06:12:27,095][WARN][logstash.codecs.plain] Received an event that has a different character encoding than you configured. {:text=\>"INC000004317145,Fechado,Sonda IT, **Gest\xE3o de Servi\xE7os de TI** ,Suporte Inicial N1,2018-11-25 18:57:53,2018-11-26 10:57:12,,,\r", :expected\_charset=\>"UTF-8"}

Thanks  
Sharon.

---

<div class="post-metadata">

### Author: ![danhermann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danhermann/32/33024_2.png) [@danhermann](https://discuss.elastic.co/u/danhermann)
#### Post date: [February 15, 2019, 1:38pm UTC](https://discuss.elastic.co/t/codec-error/168511/2 "2019-02-15T13:38:52Z")

</div>

@ssasporta, you should set the [`charset`](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-plain.html#plugins-codecs-plain-charset) property on the codec to match whatever encoding your input data is in.

---

<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: [March 15, 2019, 1:41pm UTC](https://discuss.elastic.co/t/codec-error/168511/3 "2019-03-15T13:41:33Z")

</div>

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