My problem:
I converted an HTML to plain text using this method... it takes in a .html file(this html file is .msg of outlook converted to .html) and then I removed all the tags using regex expressions.
public string ReadEmailTemplate(string EmailTemplateFilePath)
{
return File.ReadAllText(EmailTemplateFilePath);
}
but I am seeing a black diamond with white question mark inside it after removing all the html tags. I know that this happens when it is an unknown character. What I needed to do is that I need to remove those from the string. Is it possible using c# codes? I've tried this method to remove them but it did not remove those black question mark diamond..
public string replaceBlackQuestionMark(string output)
{
while(output.Contains('�'))
{
output = output.Replace("�", "");
}
return output;
}
This is the output of the string in a messageBox. It contains black diamond with white question marks.