Which dbExpress ServerCharSet do I need for utf8 data in MySQL 5?

天大地大妈咪最大 提交于 2019-12-08 08:15:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!