I receive an XML file with encoding \"ISO-8859-1\" (Latin-1)
Within the file (among other tags) I have
I do not believe this is a problem with the encoding. What you're seeing is the XML string being un-escaped.
The problem is "
is a XML escape character, so XMLTextReader will un-escape this for you.
If you change this:
<OtherText>Example "content" And ─</OtherText>
To this:
<OtherText>Example &quot;content&quot; And &#9472;</OtherText>
Then
XmlReader.Value = ""content" And ─";
You'll need to wrap your value in CDATA so it is ignored by the parser.
Another option is to re-escape the string:
using System.Security;
....
....
string val = SecurityElement.Escape(xmlReader.Value);