We have a program where the user needs to do a Copy-Paste of some content from Microsoft Word into a HTML editor (Visual Studio 2008).
That content in the HTML is then used in our confirmation emails.
Some of the characters like curly quotes turn into ? on the browser & in our confirmation email.
For the browser... I was able to find how to resolve this issue by using jQuery.
But for the confirmation email I cannot use JavaScript.
I tried this ASP.net / C# code but it hasn't worked for me.
if (s.IndexOf('\u201b') > -1) s = s.Replace('\u201b', '\'');
if (s.IndexOf('\u201c') > -1) s = s.Replace('\u201c', '\"');
if (s.IndexOf('\u201d') > -1) s = s.Replace('\u201d', '\"');
if (s.IndexOf('\u201e') > -1) s = s.Replace('\u201e', '\"');
I would appreciate any help in resolution.
Thanks.
Thank you all for your responses.
I am using the StreamReader to read the HTML file containing the Word characters.
string sFileText = "";
StreamReader objReader = new StreamReader(sFilePath);
sFileText = objReader.ReadToEnd();
objReader.Close();
return sFileText;