Hello, I've got this problem when I came across saving a text file pasted from a site to a RichTextBox. Example of this character that could cause a problem would be
“The senators are is...
Note the double quote. It's not an ordinary quote I guess because when saved as
s is an RTB.Text. Now when Process.Start("iexplore", "test.html"); the double quote colored red is displayed as a little square. I guess it's implying it's not noticeable.Code:s = string.Format("<html><head><link rel='stylesheet' href='style.css'></head><body><blockquote>{0}</blockquote></body></html>", s); byte[] content = UnicodeEncoding.Unicode.GetBytes(s); FileStream w = new FileStream(Application.StartupPath + "\\test.html", FileMode.Create); w.Write(content, 0, content.Length);
Any help? Thanks in advance.




Reply With Quote