# Convert Field Data to UTF8

**URL:** <https://discuss.elastic.co/t/convert-field-data-to-utf8/92493>\
**Category:** Kibana\
**Created:** [July 10, 2017, 2:54pm UTC](https://discuss.elastic.co/t/convert-field-data-to-utf8/92493 "2017-07-10T14:54:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaikLinnemann](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@MaikLinnemann](https://discuss.elastic.co/u/MaikLinnemann)\
**Post date:** [July 10, 2017, 2:54pm UTC](https://discuss.elastic.co/t/convert-field-data-to-utf8/92493/1 "2017-07-10T14:54:31Z")

</div>

Dear Forum,

i am new to the ELK and i would like to convert data in a field called "subject" to UTF8. The data comes pushed from logstash to elasticsearch and visualized with kibana. My problem is that the data comes in an ugly encoding and i would like to have a way to convert it to UTF8. Could anyone give me a good start how i could solve my issue. Thanks in advance,

Regards,

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [July 10, 2017, 7:00pm UTC](https://discuss.elastic.co/t/convert-field-data-to-utf8/92493/2 "2017-07-10T19:00:15Z")

</div>

What encoding is your data in when you index it into Elasticsearch? Elasticsearch and Kibana will support UTF-8. Can you convert it prior to indexing into Elasticsearch?

 ![](https://us1.discourse-cdn.com/elastic/original/3X/3/b/3bf5dd64055194541703d700e7e5e068563d703c.png)  
 ![](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fdb0ae24c17a7ab48514b2adba8bac153b26dfa1.png)  
 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/6/86c9717c5727b5cf5dde54fd203adcca9b143464.png)

---

<div class="post-metadata">

**Author:** ![MaikLinnemann](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@MaikLinnemann](https://discuss.elastic.co/u/MaikLinnemann)\
**Post date:** [July 11, 2017, 6:53am UTC](https://discuss.elastic.co/t/convert-field-data-to-utf8/92493/3 "2017-07-11T06:53:23Z")

</div>

Hi Stacey,

i push the data via logstash like:

"subject" : { "index": "not\_analyzed", "doc\_values": true, "type" : "string" },

Strictly speaking it is a subject line from postfix which i parse with grok patterns. I dont know a pretty way to convert it prior pushing as postfix logging cant convert it while logging. I thought that there might be a way to convert it from or with kibana (?).

As you can see, sometimes the subject is broken becaus of german characters.

![](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1b30586ff15390b9271891f902f6014d890023d4.png)

I tried to convert it just for a test from the shell with a perl oneliner: cat test.txt | perl -MEncode -ne 'print encode("utf8",decode("MIME-Header",$\_))' which beautifies the subject as expected.

---

<div class="post-metadata">

**Author:** ![MaikLinnemann](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@MaikLinnemann](https://discuss.elastic.co/u/MaikLinnemann)\
**Post date:** [July 13, 2017, 10:26am UTC](https://discuss.elastic.co/t/convert-field-data-to-utf8/92493/4 "2017-07-13T10:26:44Z")

</div>

Is similar converting with ELK possible? Could anyone give me a hint or a starting point to do so?

---

<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:** [August 10, 2017, 10:27am UTC](https://discuss.elastic.co/t/convert-field-data-to-utf8/92493/5 "2017-08-10T10:27:00Z")

</div>

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