Pb migration program with SQLite ANSI db from D2007 to XE4

The stable tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.
lfcap
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 25.11.2013, 11:04

Pb migration program with SQLite ANSI db from D2007 to XE4

Postby lfcap » 13.12.2017, 10:31

Hello,
I need to migrate ANSI application Delphi 2007 to Unicode XE4.
The program store ANSI data into SQLite 3 file.
The recompiled program with XE4 show incorrectly the read strings from db. The French accents are replaced by "?".

Example with text "Préférence" (é = $E9)
The XE4 program show "Pr?f?rence"

And if the XE4 program write the text into db then it’s stored with UTF8 encode (é = $C3A9).
My additional constraint is possibility to old (D2007) and new (XE4) program to accede (read and write) to the same ANSI database.

It’s possible or not?
How to do?

Thank you for help.

marsupilami
Gold Boarder
Gold Boarder
Posts: 672
Joined: 17.01.2011, 14:17

Re: Pb migration program with SQLite ANSI db from D2007 to XE4

Postby marsupilami » 14.12.2017, 12:28

Hello lfcap,

which version of Zeos do you use for your Delphi 2007 and for your Delphi XE4? Are both versions on Zeos 7.0? The problem here is that usually no other data than Unicode characters should have been written to your database - this is an SQLite requirement, as far as I know. See "Support for UTF-8 and UTF-16" here: http://www.sqlite.org/version3.html

So I think the database file needs to get corrected to have Strings stored as Unicode - even with the ANSI-Delphi. Newer Zeos versions (7.2 from SVN) should automatically use UTF-8 when talking to your SQLIte 3 database. On Unicode Delphi you get to choose which dialect of Unicode is used but that is mainly for efficiency because in the end it always is Unicode.

With best regards,

Jan


Return to “ZeosLib 7.0 Stable Forum”

Who is online

Users browsing this forum: No registered users and 1 guest