SQLite and the different UTF-8

Creating desktop or client-server database solutions?

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

cbarbal
Posts: 79
Joined: Fri May 08, 2015 5:04 pm

Re: SQLite and the different UTF-8

Post by cbarbal » Sun Sep 16, 2018 11:38 am

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2253
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: SQLite and the different UTF-8

Post by jmburnod » Sun Sep 16, 2018 1:34 pm

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4673
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: SQLite and the different UTF-8

Post by jacque » Sun Sep 16, 2018 3:11 pm

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,?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

cbarbal
Posts: 79
Joined: Fri May 08, 2015 5:04 pm

Re: SQLite and the different UTF-8

Post by cbarbal » Sun Sep 16, 2018 3:12 pm

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

cbarbal
Posts: 79
Joined: Fri May 08, 2015 5:04 pm

Re: SQLite and the different UTF-8

Post by cbarbal » Sun Sep 16, 2018 3:19 pm

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

capellan
Posts: 522
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: SQLite and the different UTF-8

Post by capellan » Mon Sep 17, 2018 2:07 am

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

cbarbal
Posts: 79
Joined: Fri May 08, 2015 5:04 pm

Re: SQLite and the different UTF-8

Post by cbarbal » Mon Sep 17, 2018 6:51 pm

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

capellan
Posts: 522
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: SQLite and the different UTF-8

Post by capellan » Mon Sep 17, 2018 9:49 pm

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

Post Reply

Return to “Databases”