I'm currently having a problem with reading the text from a file on the server that contains special characters.
The text I am tryng to read is:
"Promoter Shirt Brand Name® Product Name""
and I'm using the following method
StreamReader sr = new StreamReader(InputFilePath);
string test = sr.ReadToEnd();
This returns in .NET (note that the trademark/copyright symbols are now gone):
"Promoter Shirt Brand Name ý Product Name ý "
The same result is produced when I specify other encloding values
When I create a new file on my system, copy and paste the contents of the original text file into it and save it (with UTF-8) encoding then it works as expected, displaying the symbols correctly.
Is there a method to read this data whatever the encoding of the file being loaded?