P
Paul Bradshaw
I have a weird situation...
I have a unicode text file that contains Latin-1 characters. This code displays fine in unicode text editors, and when converted to ANSI by a tool like EditPad, it looks correct as well. But when I use the code below to load it into a Text box, all the extended characters are stripped ... either the accents are missing, or the character is just plain gone.
using (StreamReader text = File.OpenText(logFilePath))
{
string log = text.ReadToEnd();
LogFileDisplay.Text = log;
}
I'm not sure what I'm missing here. Somewhere, something is transcoding the unicode text... and I want it to just leave it alone, and display it as-is. Any pointers?
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
I have a unicode text file that contains Latin-1 characters. This code displays fine in unicode text editors, and when converted to ANSI by a tool like EditPad, it looks correct as well. But when I use the code below to load it into a Text box, all the extended characters are stripped ... either the accents are missing, or the character is just plain gone.
using (StreamReader text = File.OpenText(logFilePath))
{
string log = text.ReadToEnd();
LogFileDisplay.Text = log;
}
I'm not sure what I'm missing here. Somewhere, something is transcoding the unicode text... and I want it to just leave it alone, and display it as-is. Any pointers?
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com