# How to transform indexed fields that appear in UTF-8 to unicode?

**URL:** <https://discuss.elastic.co/t/how-to-transform-indexed-fields-that-appear-in-utf-8-to-unicode/154756>\
**Category:** Elasticsearch\
**Created:** [October 31, 2018, 6:59am UTC](https://discuss.elastic.co/t/how-to-transform-indexed-fields-that-appear-in-utf-8-to-unicode/154756 "2018-10-31T06:59:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abuameen](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@abuameen](https://discuss.elastic.co/u/abuameen)\
**Post date:** [October 31, 2018, 6:59am UTC](https://discuss.elastic.co/t/how-to-transform-indexed-fields-that-appear-in-utf-8-to-unicode/154756/1 "2018-10-31T06:59:47Z")

</div>

Hi,

were using Bro IDS with elastic-search and kafka. however some indexed fields are in arabic but they appear in a utf-8 format like this.

ÙØ³Ù  
Ø§ÙØªØ¹ÙÙÙ - Ø¥Ø¯Ø§Ø±Ø© Ø§ÙØ¥Ø®ØªÙØ§Ø± ÙØ§ÙØªØ¹ÙÙÙ

is there way for elasticsearch to transform these fields once indexed into a unicode arabic readable fields?

Thanks

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 31, 2018, 9:03am UTC](https://discuss.elastic.co/t/how-to-transform-indexed-fields-that-appear-in-utf-8-to-unicode/154756/2 "2018-10-31T09:03:30Z")

</div>

This sounds like an encoding issue outside of Elasticsearch. Elasticsearch expects its input to be correctly encoded, and the JSON spec demands JSON to be encoded in UTF-8. It's possible to encode Arabic text just fine in UTF-8, but the system that's putting data into Elasticsearch isn't doing so. For instance I can create a document that looks like this (encoded as UTF-8):

```auto
{"id":"12345","content":"الحاسوب"}

```

In general it's not possible to fix badly-encoded strings (and I don't recognise the encoding bug here so can't say if this particular one is fixable). You're better off avoiding the problem by correctly encoding the data on the way 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:** [November 28, 2018, 9:03am UTC](https://discuss.elastic.co/t/how-to-transform-indexed-fields-that-appear-in-utf-8-to-unicode/154756/3 "2018-11-28T09:03:34Z")

</div>

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