Which dbExpress ServerCharSet do I need for utf8 d

2019-05-31 02:39发布

问题:

We tried ServerCharSet=utf8 and ServerCharSet=UTF8, based on information found in newsgroups - but still, special characters / Umlauts do not appear correctly in the client data.

We use Delphi 2009 and the built-in dbExpress driver. Field data is retrieved using AsWideString.

回答1:

you have to set up a client charset.
Simple "SET NAMES utf8" query, executed right after connect, will do the trick