Subject: | UTF-8 in REST::Neo4p::Query doesn't work? What I'm doing wrong? |
Dear Mark Allen Jensen,
Merry Christmas and thank you so much for really useful module REST::Neo4p!
I have some question which is not covered by documentation. As you certainly know, UTF-8 is somewhat "native" encoding for Perl, so I write my Perl scripts in Windows using the UTF-8 capable text editor. I reopen console with
open STDERR, '>:encoding(cp1251)', 'CON:' or die...
it does the job, and naturally, all Cyrillic string literals in my scripts are UTF-8 and this works Ok for me.
But as soon as I started learning Neo4j and playing with it, I discovered the following. Suppose I have a perfectly valid Cypher query wich contains Cyrillic literals UTF-8 encoded. As soon as I use it by mouse Ctrl-C+Ctrl-V into Neo4j web interface, it works.
As soon as I pack my query into text string, and pass it to
REST::Neo4p::Query->new() constructor works Ok. But as soon as I perform $qry->execute() program fails with dubious non-informative message in stderr:
HTTP::Message content must be bytes at D:/Strawberry_Perl_5.18.1.1_x64/perl/site/lib/HTTP/Request/Common.pm line 94.
As soon as I remove all Cyrillics from literals in the query, it works perfectly Ok. Same goes when I try to use REST::Neo4p::Node methods, BTW.
Would you please mind giving me an advice for this matter? Shall I do something special with my Cypher querys? Is is a bug in HTTP::Request module? What shall I do in order to get REST interface UTF-8 transparent it both directions?
Thank you so much for your work and your kind attention!
With best regards,
Andrii Stesin
Kyiv, Ukraine (it's where Maidan goes now).