2

I'm trying to store a text that contains special characters like (ç,é,è,à ...) in neo4j from java using the REST api but i'm getting the following error :

{"results":[],
"errors":[{"code":"Neo.ClientError.Request.InvalidFormat","message":"Unable to deserialize request: Invalid UTF-8 start byte 0xfd\n at [Source: HttpInputOverHTTP@b15eccb; line: 1, column: 1237]"}]}
  • I already setted the charset to UTF-8 in the header of my request
  • I did also add the following line to the neo4j.conf file , section JVM parameters :

dbms.jvm.additional=-Dfile.encoding=UTF8

but this still getting the same error.

does anyone have a solution for this ?

  • What method are you using to send to the API? Can you include the exact curl command / shell script / other code that is sending to it so your issue can be reproduced? – Rebecca Nelson Apr 12 '18 at 15:23
  • You should check out this [question](https://stackoverflow.com/questions/6622226/check-if-a-string-is-valid-utf-8-encoded-in-java). The error says you are trying to use a non-UTF-8 complaint byte string. (Note, Java strings are UTF-16). You should validate the input before passing it to Neo4j. – Tezra Apr 16 '18 at 20:40

0 Answers0