Page 2 of 2

Re: SQLite and the different UTF-8

Posted: Sun Sep 16, 2018 11:38 am
by cbarbal
SOLVED!, but

Thank you very much to all who have sent me answers. When jacque told me it was UTF-16 I put:

Code: Select all

put textDecode (revDataFromQuery (tab, cr, gDatabaseID, tQuery), "UTF-16") into tData
instead of,

Code: Select all

put textDecode (revDataFromQuery (tab, cr, gDatabaseID, tQuery), "UTF-8") into tData
as I have seen in your subsequent message
.
Anyway, I still have doubts. I have put in the preferences of, DB Bowser for SQLite, that the tables that you create are UTF-16. I have created a table with this configuration and I continue with the same problems. If I put textDecode (tData, "UTF-8") it looks correctly. If it's UTF-16, would not it have to look good in the first place?

Regards,

Carles

Re: SQLite and the different UTF-8

Posted: Sun Sep 16, 2018 1:34 pm
by jmburnod
Sorry I never used SQlite but we met some issues to get the correct name of a filename with accented letters. Maybe it's something like that
Here is the topic
http://forums.livecode.com/viewtopic.php?f=8&t=31486

Re: SQLite and the different UTF-8

Posted: Sun Sep 16, 2018 3:11 pm
by jacque
Anyway, I still have doubts. I have put in the preferences of, DB Bowser for SQLite, that the tables that you create are UTF-16. I have created a table with this configuration and I continue with the same problems. If I put textDecode (tData, "UTF-8") it looks correctly. If it's UTF-16, would not it have to look good in the first place?
Yes, it should be correct. Something else must be changing it to UTF8 before LC gets the data. I don't work with databases much, but maybe SQLite does that,?

Re: SQLite and the different UTF-8

Posted: Sun Sep 16, 2018 3:12 pm
by cbarbal
Hello Jean-Marc

I thought that only happened to me. Anyway, the name of my files, are never accentuated. The folders can carry accents. It's good to know when you're starting to look at a new program.

Regards,

Carles

Re: SQLite and the different UTF-8

Posted: Sun Sep 16, 2018 3:19 pm
by cbarbal
Hi Jacqueline,
Yes, it should be correct. Something else must be changing it to UTF8 before LC gets the data. I don't work with databases much, but maybe SQLite does that,?
SQLiteAdmin of lcSQL Software, In preferences database have a check box with: Livecode compatibility mode.

Regards,

Carles

Re: SQLite and the different UTF-8

Posted: Mon Sep 17, 2018 2:07 am
by capellan
Hi Carles,
SQLiteAdmin of lcSQL Software, In preferences database have a check box with: Livecode compatibility mode.
I was looking at every screenshot of sqliteadmin:
http://www.lcsql.com/sqliteadmin-screen-shots.html
but could not find this preference.

Have you written to sqliteadmin support to learn if they
could help in this conversion processs?

Post your new results if they answer your question about
data conversion.

Al

Re: SQLite and the different UTF-8

Posted: Mon Sep 17, 2018 6:51 pm
by cbarbal
Hi Alejandro,

Today I've been out all day. In the demo that I downloaded, the presentation of the screens has changed. I attached a screen dump.
SQLiteAdmin001.jpg
This is what ma has answered Pete
Hi Carles,
That setting has to do with the way Livecode used to handle columns with type of BLOB. AT one time, it would specially encode them but then stopped doing that. This setting controls whether the BLOB columns need to be decoded from their Livecode format. It has nothing to do with the problem you are seeing.
Regards,

Carles

Re: SQLite and the different UTF-8

Posted: Mon Sep 17, 2018 9:49 pm
by capellan
Now we could see the correct screenshot. Many thanks! :D

I am glad that all developers in this forum could help you to solve
this data conversion problem.

If you post screenshots, exact recipes (step by step instructions)
and sample stacks then many developers will help faster.

Al