I had a similar problem when trying to import data from Sybase 12.5 into MS SQL Server 2005.
Basically, MSSQL stores euro and euro signs in vararch if they are encoded correctly, which is great, but I did not understand that Sybase displays data as windows-1252 (Western European), and not UTF-8, and this led to the fact that the data , such as E and the euro symbol, have been translated by the import program as "?". By telling the import program that the input is encoded as 1252, the problem is fixed.
If you encode the output from DB as 1252, when you read it, you should get the correct characters.
For instance:
System.Text.Encoding enc = System.Text.Encoing.GetEncoding(1252); MySqlDataReader msdr = command.ExecuteReader(); while(msdr.Read()) { ... string val = enc.GetString(enc.GetBytes(msddr.GetString(mssdr.GetOrdinal("varhcar_field")))); ... }
source share