Strange charaters when outputting to html file
Hi all!
I've written a C# program that fetches data from a couple of webpages, merges it and writes it onto a new html file. My only problem is that the swedish charaters å, ä and ö that are part of the pages get corrupted when viewing my new html page in Internet Explorer. For example ä becomes 'ã?'. The funny thing is that if I open my html page in Notepad and then saves the page without editing and then open it in Internet Explorer again, the charaters look fine! I guess I'm doing something wrong when I write the file. This is a shortend version of my code:
TextWriter tw = new StreamWriter("C:\\mypage.html");
tw.WriteLine("My text here with strange characters");
tw.Close();
Can anyone help me?
/Snorre
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

sacrespRank #1,944 · 754 reputationPosted Dec 10, 2003, 8:50 PM EST
snorresturlasson9 reputationPosted Dec 11, 2003, 4:48 AM EST
snorresturlasson9 reputationPosted Dec 11, 2003, 8:58 AM EST