[yunqa.de] Re: French characters in DISQLITE3

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Sun, 27 Feb 2011 13:48:56 +0100

On 27.02.2011 10:23, Luc wrote:

> I can store the text field but some french characters like é, ç and è
> are not properly displayed (not in sqlitspy nor in sqliteexpert).
> is there a way to store them properly with DISQLITE3 ?

Absolutely. DISQLite3 stores all text as Unicode and can store any
French character wich no problem.

You have to take care about how you pass your text to the DISQLite3
functions. There are two options:

1. If you use any of the "normal" functions, you must encode your text
to UTF-8 first.

2. If you do not want to encode, you can use any of the WideChar API
functions which end  in sqlite3_...16().

The same holds true when you retrieve text from the database: Decode
back from UTF-8 if you use any of the "normal" functions or retrieve
PWideChar / WideString Unicode text by calling any the sqlite3_...16()
functions.

SQLiteSpy is fully Unicode enabled, so if you see right characters there
you know that they have been stored correctly.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: