Replacing a little diamond with a question mark UT8 encoding
How to recognize and replace little diamond with a question mark character in code, Review the example.txt file attachment and you notice a weird character once you read the file into memory, when you open the text file its a dash, but when you read in the text file its a little diamond with a question mark
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

SenthilkumarRank #387 · 6.5K reputationPosted Apr 3, 2012, 10:37 PM EDT
you need to follow the encoding while reading the content from the file.
This will show the content from your file as it is.
Hope this will help you.
David SmithRank #999 · 2K reputationPosted Apr 4, 2012, 3:29 AM EDT
sr = new StreamReader(pDelFileName, System.Text.Encoding.Default, true);
Amr Mohallel2 reputationPosted Jun 18, 2013, 9:22 AM EDT
I Signed up in this website just to say a BIG THANK YOU!
Best regards!