could you explain me what I'm doing wrong, c/z I'm totally confused with what I saw
Let's say we have XML which contains a node like that
<Name>ГАБИДУЛЛИН А З</Name>
if I do
$lastname = $xpath->query(//Name/text()")->item(0)->textContent;
$sql = "call save_ticket_ordered($order_id, $ticket_num, '$lastname', '$time', '$user', @retcode);";
error_log("Calling stored procedure: " . $sql);
I see in error.log
[Mon Oct 06 23:34:21.018149 2014] [:error] [pid 13255] [client 127.0.0.1:44050] Calling stored procedure: call save_ticket_ordered(103696202, 78290448213275, '\xd0\x93\xd0\x90\xd0\x91\xd0\x98\xd0\x94\xd0\xa3\xd0\x9b\xd0\x9b\xd0\x98\xd0\x9d \xd0\x90 \xd0\x97', '03.10.2014 09:53', 'xxxxxxx', @retcode);
But if I run
$xmldoc = new DOMDocument();
$xmldoc->load("response.xml");
$xpath = new DOMXPath($xmldoc);
$lastname = $xpath->query("//Name/text()")->item(0)->textContent;
echo $lastname;
I'm able to see a normal cyrillic result in my terminal,
ГАБИДУЛЛИН А З
So what would you recommend to achieve my goal to put into a DB a proper cyrillic string?