1

目前我正在处理一个关于 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)

4

2 回答 2

1

Have you set SQL_UTF8_EXECS = 1 as detailed at http://docs.openlinksw.com/virtuoso/dbadm.html#ini_Client?

于 2012-09-23T03:01:14.607 回答
0

您需要正确配置 ODBC 连接字符串,以便 Virtuoso 正确接受 UTF-8

您是否Charset=utf-8在连接字符串中包含了参数?

如果您有并且仍然遇到此问题,那么您可能应该联系 Virtuoso 开发人员以获得进一步的帮助

于 2012-09-23T00:58:31.167 回答