How can I get PreMailer.Net to not change the encoding of non-ascii characters?
Depending on your individual needs, as merely a guide, try these:
Symbols.Ampersand: temp.Append("&")
Symbols.NoBreakSpace: temp.Append(" ")
Symbols.GreaterThan: temp.Append(">")
Symbols.LessThan: temp.Append("<")
Update:
These lines come from lines 132-139 of a PreMailer.Net dependency called AngleSharp, which is an HTML parser.
Currently, as far as I can tell the encoding is mandatory on AngleSharp, and hence it cannot be avoided with any setting in either AngleSharp or PreMailer.Net.
According to the following closed issue, this is by design in accordance with the HTML spec. However, I believe there is still a bug as it should only encode attribute values, not innerHTML content. Additionally, I don't think it is an acceptable behavior for a CSS inliner, which should not be validating or sanitizing HTML. Additionally, I don't even think the parser should be making changes that are not asked for by the client.