# Elasticsearch changes encoding through "import geojson"

**URL:** <https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817>\
**Category:** Elasticsearch\
**Created:** [April 21, 2021, 9:48am UTC](https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817 "2021-04-21T09:48:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sieczaa](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sieczaa](https://discuss.elastic.co/u/sieczaa)\
**Post date:** [April 21, 2021, 9:48am UTC](https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817/1 "2021-04-21T09:48:24Z")

</div>

Hello,  
we've got elasticsearch 7.8.1,  
when I import geojson file with coordinates of polish counties, elasticsearch creates index, but changes encoding of polish characters like "ę,ś,ć,ź,ń,ą,ł".

I imported sth like this:  
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[21.8034,50.1514],  
[21.7874,50.0984],....,[21.8034,50.1514]]]},"properties":{"id":1,"name":"ropczycko- sędziszowski"},"id":0},

(full json file is available here: [https://raw.githubusercontent.com/ppatrzyk/polska-geojson/master/powiaty/powiaty-min.geojson](https://raw.githubusercontent.com/ppatrzyk/polska-geojson/master/powiaty/powiaty-min.geojson) )

and in discovery I get this:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a81a01595171ea40a531a5241d9ca4ae49b82f42.png)

Is there any solution for this bug?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 21, 2021, 12:36pm UTC](https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817/2 "2021-04-21T12:36:05Z")

</div>

Welcome!

You need to make sure that your json is using UTF8.

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [April 22, 2021, 11:42am UTC](https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817/3 "2021-04-22T11:42:04Z")

</div>

If you are using Kibana Maps to upload your GeoJSON file, there was an encoding issue that [was fixed for 7.11](https://github.com/elastic/kibana/pull/83122)

Your GeoJSON file loads just fine in 7.11 👇

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/8/18c4f92c921ba9a9c4f5803591b3d27d19b7e873.jpeg)

---

<div class="post-metadata">

**Author:** ![sieczaa](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sieczaa](https://discuss.elastic.co/u/sieczaa)\
**Post date:** [April 22, 2021, 11:57am UTC](https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817/4 "2021-04-22T11:57:54Z")

</div>

Great, thank you - that's exacly what I needed

---

<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:** [May 20, 2021, 11:58am UTC](https://discuss.elastic.co/t/elasticsearch-changes-encoding-through-import-geojson/270817/5 "2021-05-20T11:58:06Z")

</div>

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