rathinagiri wrote:Thanks a lot for the detailed explanation Qatan.
I didn't use DBF autoincrement fields. So I didn't know about that. I will dig into it and make use of it.
1. Regarding ICU, unfortunately HMG is not ready for Unicode implementation even though Harbour is. There are many places to be changed for unicode implementation.
2. SQLCipher is possible now. You can encrypt/decrypt the whole database on the fly without any hustle. You can download the library and details from here.
viewtopic.php?f=7&t=2416
3. Will FTS be possible without ICU?
Regarding encryption and decryption I have coded a small utility if you have installed the SQLCipher properly.
encryptsqlite.zip
Hello Rathinagiri,
Thanks for answering.
FTS is independent of ICU. ICU is an external component that you can add to SQLite (or Harbour DBF).
FTS is useful to look on the database for a certain word(s) or code(s). Has many uses and makes the application very fast. Imagine that you have a car factory and you need to know what is the engine part on a database that has millions of rows and the only information you have is part of the code and the brand then with FTS you will find it very quick.
It would be nice to have ICU working with SQLite and I belive you do not need to have HMG UTF8 ready... Well as far as I understand you need to have your database set to UTF8 and your application just needs to have hb_strtoutf8() / hb_utf8tostr() convertions when necessary.
I was looking the Changelog and found this:
------
2010-11-01 00:05 UTC+0200 Petr Chornyj (myorg63 at mail.ru)
* harbour/contrib/hbsqlit3/hbsqlit3.c
* Changed syntax of sqlite3_exec() to
sqlite3_exec( db, cSQLTEXT, [pCallbackFunc]|[cCallbackFunc],
[lConvertSQLTextToUTF8], "cCDP" ) -> nResultCode
From now we can replace
cSQLTEXT := hb_strToUTF8( cSQLTEXT, "RU1251" )
sqlite3_exec( db, cSQLTEXT )
with
sqlite3_exec( db, cSQLTEXT, , .t., "RU1251" )
* Changed syntax of sqlite3_bind_text(), sqlite3_column_text()
in such way
* Changed sqlite3_bind_blob() according to sqlite3 docs.
------
So I think you can have your database in UTF8 and you program can be any other codepage.
What do you think?