目前我正在使用virtuoso和php上的项目(windows7(64)),
在Virtuoso的三元组“插入”(sparql查询)不适用于俄语(UTF-8)
$iquery = "sparql INSERT DATA INTO <http://example.net/Empl> {<http://example.net/empl1> <http://example.net/firstname> 'Русский язык'.}";
以下查询适用于英语,但当俄语(UTF-8)中出现一行时,PHP会返回错误
*Warning*: odbc_exec() [function.odbc-exec <http://localhost:8890/test/admin/function.odbc-exec>]: SQL error: [OpenLink][Virtuoso ODBC Driver][Virtuoso Server]SQ074: Line 1: Bad escape sequence in a SPARQL short single-quoted string at '\', SQL state 37000 in SQLExecDirect in*C:\virtuoso-opensource\vsp\test\admin\index.php*on line*164*
你能为我提供什么?
谢谢, 塞吉
PS sparql查询“插入”与isql
中的俄语(UTF-8)一起使用答案 0 :(得分:0)
您需要正确配置ODBC连接字符串才能使Virtuoso正确接受UTF-8
您是否在连接字符串中包含了Charset=utf-8
参数?
如果您有并且您仍然遇到此问题,那么您应该联系Virtuoso开发人员以获得进一步的帮助