开发者

Managing Unicode Data in MySQL and VB.NET

开发者 https://www.devze.com 2022-12-18 00:32 出处:网络
I wish to develop a client-server application in VB.NET. I want to store some fields in Unicode. As per MySQL documentation I tried the fields with varchar and charset UT开发者_高级运维F-8 for storing

I wish to develop a client-server application in VB.NET. I want to store some fields in Unicode. As per MySQL documentation I tried the fields with varchar and charset UT开发者_高级运维F-8 for storing Unicode data.

I could insert data using the MySQL connector command object but when I try to display data in datagridview some junk is appearing.

What am I missing?


I don't know VB.NET, but you should have the possibility to set the encoding of the database connection from your application to MySQL when setting up to connection. Is that part set to UTF-8 as well?

Alternatively you can try issuing the following MySQL command after you connect:

SET NAMES utf8
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号