> As a test, please execute this command against both versions of the database:
> 
> SELECT path,hex(path) FROM "test-directories" WHERE id=68

Result of the query below

SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open test.original.db
sqlite> .tables
spellfix_metadata_titles  test-directories
spellfix_tag_titles       test-media_parts
sqlite> SELECT path,hex(path) FROM "test-directories" WHERE id=68;
Jap�n (2002)|4A6170C3B36E20283230303229
sqlite>


compare this output with doing the same when using sqlite3.exe version 3.8.6

SQLite version 3.8.6 2014-08-15 11:46:33
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open test.original.db
sqlite> SELECT path,hex(path) FROM "test-directories" WHERE id=68;
Japón (2002)|4A6170C3B36E20283230303229
sqlite>


So there has been a change sometime between 3.8.6 and 3.13.0 

Regards

Simon

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Simon Slavin
Sent: 13 July 2016 16:55
To: SQLite mailing list <[email protected]>
Subject: Re: [sqlite] [Windows] 3.13.0 recreate db from .dump file corrupts 
records with extended characters


On 13 Jul 2016, at 4:09pm, S.Ajina <[email protected]> wrote:

> Doing the same with the current version of sqlite3.exe (version 3.13.0) 
> corrupts the database records when there are extended characters

I would guess that your program is handing extended characters to SQLite 
incorrectly.  All strings passed to SQLite are assumed to be Unicode strings.  
This includes not only strings used as parameters when binding to a SQL 
statement, but also the SQL statements themselves.

Given the way you phrased your question, I assume you've been using MBCS.

If you make up a string which depends on a Windows codepage, and do not 
explicitly convert this string to Unicode before handing it to SQLite, you will 
get bad results.  Maybe not immediately, but later, perhaps after indexing.

As a test, please execute this command against both versions of the database:

SELECT path,hex(path) FROM "test-directories" WHERE id=68

You (or we) should be able to tell what's happening from the results of that.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to