Last post Mar 08, 2017 02:39 AM by Eric Du
Feb 22, 2017 08:06 PM|KurJoh|LINK
I'm a beginner with asp.net, and have with success used the create user wizard control in my application. But, I have struggled for many hours with a country specific problem.
The mail to the new user contains a body text file written with Windows "notes", and contains some Scandinavian characters e.g. "ö".
The Scandinavian characters are not presented in the arriving email, so is there a way to encode from
ASII or us-EN to iso-8859-1 or se-SE?
Looking forward seeing a solution or suggestion how to solve this issue.
Thanks and have a nice day.
Feb 23, 2017 09:07 AM|Eric Du|LINK
The Scandinavian characters are not presented in the arriving email, so is there a way to encode from ASII or us-EN to iso-8859-1 or se-SE?
According to your description, here is a sample that convert form UTF-8 to ISO. Please try the following codes:
protected void Button1_Click(object sender, EventArgs e)
string Message = "ÄäÖöÕõÜü";
Encoding iso = Encoding.GetEncoding("ISO-8859-1");
Encoding utf8 = Encoding.UTF8;
byte utfBytes = utf8.GetBytes(Message);
byte isoBytes = Encoding.Convert(utf8, iso, utfBytes);
string msg = iso.GetString(isoBytes);
Feb 23, 2017 02:49 PM|KurJoh|LINK
Works great! Thank you!!
Mar 08, 2017 02:39 AM|Eric Du|LINK
I'm glad to hear that it solves your problem, and thanks for your feedback!
If this reply is helpful to you, I hope you could mark it as answer, this will help more people who meet the same problem as you!