Hi there...
Was going to submit this as a bug, but I am not sure it is a bug (well, its
undesirable behaviour, but might need more discussion).
Playing with the REST API and PHP. All going well, however one problem.
The data I am trying to save is encoded in UTF-8. When I try to save data in
this format, the response from the sever is truncated (e.g. cut off in mid
response). The PHP json_encode function converts the utf-8 data to unicode
codepoitnts (eg. \u1234).
E.g.
$node = array(
'title' => 'Some text with UTF-8 chars'
);
json_encode($node);
returns something like '\u2018Hello world\u2018'
However if you post data like this to the REST API the response comes back
cut off. This is an example response:
{"incoming typed relationships":"
http://localhost:9999/node/80/relationships/in/{-list|&|types}<http://localhost:9999/node/80/relationships/in/%7B-list%7C&%7Ctypes%7D>","incoming
relationships":"http://localhost:9999/node/80/relationships/in","all
relationships":"http://localhost:9999/node/80/relationships/all","create
relationship":"http://localhost:9999/node/80/relationships","data":{"title":"Intihuatana
Stone, the ‘Hitching Post of the Sun,‘"},"traverse":"
http://localhost:9999/node/80/traverse/{returnType}<http://localhost:9999/node/80/traverse/%7BreturnType%7D>
","property":"http://localhost:9999/node/80/properties/{key}<http://localhost:9999/node/80/properties/%7Bkey%7D>
","self":"http://localhost:9999/node/80","properties":"
http://localhost:9999/node/80/properties","all typed relationships":"
http://localhost:9999/node/80/relationships/all/{-list|&|types}<http://localhost:9999/node/80/relationships/all/%7B-list%7C&%7Ctypes%7D>","outgoing
typed relationships":"
http://localhost:9999/node/80/relationships/out/{-list|&|types}<http://localhost:9999/node/80/relationships/out/%7B-list%7C&%7Ctypes%7D>","outgoing
relationships":"http://localhost:9999/node/80/relationships/o
Note that it cuts off half way through the "outgoing relationships" value.
So, whats the correct way to do this? Is this a bug, or is it that I need to
pass in a HTTP header to signal its unicode? Is the problem that (as I
beleive java uses UTF-16 internally) its outputting the wrong character
encoding? Is it possible to tell it what you want?
Al
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user