I have a program which using Dapper read in data from SQL Server and then save the data into another MySQL database. What it is doing is:
- Read in data from SQL server as a list of objects e.g.
List<AKindOfObject> =
read in data from SQL Server - Open a connection to MySQL, save the
List<AKindOfObject>
The problem is some property of AKindOfObject
is saved as Chinese in original database. When the data is transferred to the MySQL database, those Chinese characters are shown as "?".
Is there any way to change the encoding of List<AKindOfObject>
to gb2312 in C# code?