Neo4j REST编码 [英] Neo4j REST Encoding

查看:60
本文介绍了Neo4j REST编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用neo4jclient.当我尝试创建/更新节点时,像äöü这样的特殊字符被替换为``. 我是否必须设置特定的http标头,例如content-type,content-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?

谢谢.

请求的外观如下:

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:)

推荐答案

现在可以使用

在分析了messages.log之后,我们发现file.encoding不是utf-8.

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

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

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

因此,我们在neo4j-wrapper.conf文件中设置了以下属性:

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

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

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

现在它可以工作了!!! :)

Now it works!!! :)

感谢我的兄弟!认识Java开发人员总是很高兴. :)

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

这篇关于Neo4j REST编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆