ES special chars issue


#1

Hello,

I am using a Python script to import data in my ES index. The script successfully import data to ES but when I try to get the data, it presents special chars issue such as :

curl -X GET "10.0.1.99:9200/stops/stop/8014114"

{"_index":"stops","_type":"stop","_id":"8014114","_version":2,"found":true,"_source":{"stop_id" : 8014114, "stop_name" : "Neckargemünd", "stop_lat" : "49.3936766099977", "stop_lon" : "8.78842503827998"}}

The should ü be ü.

Below is the python request :

headers = {"Content-type": "application/json", "Accept": "text/plain"}
connection.request('PUT', url=endpoint, headers = headers, body=to_elastic_string.encode('utf-8'))

I've noticed that when I replace that char with the python encoded value in my to_elastic_string var such as : \u00FC, it works well.

I've been searching for ages, hope someone could help me, thanks!


(system) #2

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