Search code examples
neo4jneo4jclient

Neo4j REST Encoding


I'm using neo4jclient. When I try to create/update an node, special chars like äöü are replaced with �. Do I have to set a specific http header like content-type, content-encoding? If yes, what kind of header and what is the value of this header?

Thanks.

EDIT: This is how the request looks like:

POST http://...........:7474/db/data/batch HTTP/1.1

Accept: application/json;stream=true

User-Agent: RestSharp 103.1.0.0

Content-Type: application/json

Host: ............:7474

Content-Length: 267

Accept-Encoding: gzip, deflate


[

  {

"method": "POST",
"to": "/node",
"body": {
  "Name": "äöü",
  "State": "Active",
  "Id": 0,
  "CreateDate": "2012-07-12T18:48:45.3343526+02:00",
  "ChangeDate": "0001-01-01T00:00:00+00:00"
},
    "id": 0
  }
]

Or is it bug in the batch execution? If yes, I'll need the fix very quick:)


Solution

  • Now it works

    After analyzing the messages.log we found out, that the file.encoding wasn't utf-8.

    --> DEBUG [neo4j.diagnostics]: file.encoding = Cp1252

    So we set in the neo4j-wrapper.conf file this property:

    wrapper.java.additional.3=-Dfile.encoding=UTF-8

    Now it works!!! :)

    Thanks to my brother! Always good to know a Java developer. :)