2007/11/22

MySQL & .NET MySQL connector & Chinese Support

I just encounter a serious problem when inserting chinese data into MySQL using .NET MySQL connector. It shows like ????.

OK...Here is the solution:

Change Connection String and add charset=utf8:

Example:
Database=[dbname];Data Source=[source];User Id=[userid];Password=[password];charset=utf8