utf8 support ?

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply

utf8 support ?

Post by wesson » Thu 14 Apr 2005 14:20

I'm running delphi 7
I use TSQLConnection with MySQL Direct driver (I'm a registered customer)
I also use MySQL server 4.1.10, with UTF8 as default character set.

When sending queries that contains strings, it seems that the string is truncated or not passed correctly - so the query has very strange results

If the character set of the MySQL server is set to Latin1, then I have no problem.

Is there any explanation or workaround ?

Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 14 Apr 2005 15:09

If to work in this charset all string data before passing to the server must be converted by UTF8Encode, and on retrieve at client side - by UTF8Decode. As dataware controls don't support UTF8, this charset is used in Delphi very seldom.

Now we are working on release a new MyDAC version that will in Unicode = True mode return all strings as WideString. But this way is not applicable in dbExpress as it doesn't support WideString fields.

> Is there any explanation or workaround ?

Use another (not Unicode) charset.

Post Reply