J
Jon Davis
I have a problem with encoding, I think (??). I have the following code:
StreamWriter sw = File.CreateText(l);
sw.Write(data);
sw.Close();
Now, "data" is a string that contains text, but sometimes contains special characters, like "§".
When I upload this file to a web server, what I get back is a preceding junk character. For instance, for the character "§", when I browse the file in IE I get "§".
If I open the file in Notepad, the character is "§", but when I view it in a command prompt with the "type" command, I get "┬º", whereas if I type "§" in notepad and save it the command prompt sees it as "º", so the junk character before in the command prompt is "┬".
What is going on and how do I fix this?
Jon
StreamWriter sw = File.CreateText(l);
sw.Write(data);
sw.Close();
Now, "data" is a string that contains text, but sometimes contains special characters, like "§".
When I upload this file to a web server, what I get back is a preceding junk character. For instance, for the character "§", when I browse the file in IE I get "§".
If I open the file in Notepad, the character is "§", but when I view it in a command prompt with the "type" command, I get "┬º", whereas if I type "§" in notepad and save it the command prompt sees it as "º", so the junk character before in the command prompt is "┬".
What is going on and how do I fix this?
Jon