Page 1 of 1

Loss of unicode characters when read from DB

Posted: Thu 22 May 2014 01:06
by nszmnsky
Using SQLite in an FMX application, I have entries in database that include a special character ⌡(0x2321). If I cut and past from the DB into text of component (TMSFMXHTMLText) the character displays correctly however if I read text from database in the program (setting a string variable Prmt := DB.TBL.FieldByName('prmtTEXT').AsString) the displayed character is right paren ')' (character 0x0029). If I edit Prmt variable in debug and insert character (using Character Map from system tools) the display is correct. I also tried using WideString but that didn't work either.

It seems that the issue is on the read from the DB but am I missing something?
Thanks in advance for any insight or troubleshooting suggestions

Re: Loss of unicode characters when read from DB

Posted: Thu 22 May 2014 11:38
by AlexP
Hello,

For correct display of unicode symbols, you should enable the following option:

Code: Select all

LiteConnection1.Options.UseUnicode := True;

Re: Loss of unicode characters when read from DB

Posted: Fri 23 May 2014 02:40
by nszmnsky
That was the solution. Thanks! I simply overlooked that connection would control unicode use.

Re: Loss of unicode characters when read from DB

Posted: Fri 23 May 2014 09:33
by AlexP
You are welcome. Feel free to contact us if you have any further questions.