Hi,
Is there any way to create a field in a table in SQLite that will accept international characters, they always seem to get messed up when I add them.
Im creating the table as follows - am I doing something wrong?
get revOpenDatabase ("sqlite",dbPath,,,,,)
put it into gdbID
revExecuteSQL gDBId, "CREATE TABLE Progress(" & \
"Id INTEGER PRIMARY KEY AUTOINCREMENT" & comma & \
"user TEXT NULL" & comma & \
"field1 TEXT NULL" & comma & \
"field2 TEXT NULL" & comma & \
"notes TEXT NULL)"
It works fine, until you try to insert something other than an international character or trademark symbol etc.
Thanks
Andy
SQLite - International Characters
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Hi Andy,
Internally, Revolution works with UTF-16, which can be dependent on the host platform. It is generally advisable to use UTF-8 on the 'end-points', where data goes in or comes out.
Another option is to rely on the htmlText property, where diacritical characters are converted to numbers.
Hope this helped,
Jan Schenkel.
Internally, Revolution works with UTF-16, which can be dependent on the host platform. It is generally advisable to use UTF-8 on the 'end-points', where data goes in or comes out.
Code: Select all
put uniDecode(theString,"UTF8") into theUTF8String
Code: Select all
set the text of the templateField to theString
put the htmlText of the templateField into theHtmlString
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com