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