#1 2014-05-14 09:13:41

tiger
Member
Registered: 2014-05-14
Posts: 11

can not create sqlite3 db in a path which have chinese

hi AB:
       when my program's path like c:\dev\测试, and i run program to create a sqlite3 db with delphi7,it will report a error:invalid sqlite3 database handle(14) . howerver, when i run this program with xe5 or change chinese to english of the path,it will be success.
      i follow the source code in synSQlite3.pas,i know it could be in
     function TSQLDataBase.DBOpen: integer;
     line 3444 utf8 := fFilename;
     i changed it  utf8 := StringToUTF8(fFilename);it didn't work.how can I do?

Last edited by tiger (2014-05-14 09:14:42)

Offline

#2 2014-05-14 10:54:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: can not create sqlite3 db in a path which have chinese

Weird...
The official http://www.sqlite.org/c3ref/open.html documentation states that UTF-8 encoded file names should work.
Could you step within StringToUTF8() and see if everything sounds fine during the Ansi -> UTF-16 -> UTF-8 conversion?

Perhaps you have an outdated version of the source code (1.17 is deprecated).
Please use latest "unstable" 1.18 revision, from http://synopse.info/fossil/wiki?name=Get+the+source
And do not forget the get the latest .obj files for the SQLite3 engine.

Offline

#3 2014-05-15 15:17:33

tiger
Member
Registered: 2014-05-14
Posts: 11

Re: can not create sqlite3 db in a path which have chinese

thanks ab.it turned to be my default.i test with sqlite example which run success.

Last edited by tiger (2014-05-15 15:18:11)

Offline

Board footer

Powered by FluxBB