As some of my clients from china, they want to save Chinese characters in database and retrieve it in web page. It is a piece of cake to save and display those characters in web page.
To save Chinese character in database:
Insert into Table1 ( Field1, Field2) values ( Test1 , N'藏青')
But there is a function to send system generated email to customers. Here is the problem !!! I am very strange that the Chinese characters cannot display both of my gmail and outlook . There is ?????-???? instead of displaying Chinese characters. So I research online and I found some code from codeproject website that can able to see Chinese characters in Gmail. See the following code:
public string getCorrectCharacter(string str)
Encoding iso = Encoding.GetEncoding("iso8859-1");
Encoding unicode = Encoding.UTF8;
byte unicodeBytes = unicode.GetBytes(str);
Although Gmail can display chinese character correctly, Outlook Email still cannot display. I will continue to find to display correctly in every email.
If you guys have the code, please share to me. Thanks in advance