Four years later, and I have the same problem with some encoded characters (version 1.4.9.5). In my case, there is a limited set of characters that can cause a problem, so I just created a function to take notes:
// to be called before HtmlEntity.DeEntitize public static string ReplaceProblematicHtmlEntities(string str) { var sb = new StringBuilder(str); //TODO: add other replacements, as needed return sb.Replace(".", ".") .Replace("ă", "ฤ") .Replace("â", "รข") .ToString(); }
In my case, the string contains both html encoded characters and UTF-8 characters, but the problem is only with some encoded characters.
This is not an elegant solution, but a quick fix for all text with a limited (and known) number of problematic encoded characters.
source share