I have the following text in a file...
blah blah ñ blah
Notice the ñ symbol.
I'm reading this with StreamReader.ReadLine
and then trying a string.Replace
to replace the special character.
For some reason this isn't working, and it seems to be something to do with the StreamReader
. When I inspect the string in the debugger after reading the line, I get that box shape that text editors display when they can't render a character.
Trying similar directly in code works fine...
int test = "helloñworld".IndexOf('ñ');
so I figure it must be the StreamReader.
Any ideas?