问题
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
来源:https://stackoverflow.com/questions/3598593/which-dbexpress-servercharset-do-i-need-for-utf8-data-in-mysql-5