Reading XML files with different encoding, like ISO-8859-1
I used a XMLDocument to load a file with the encoding ISO-8859-1, but accents were lost. The problem is that the inner FileReader is using the default UTF-8 encoding, or not detecting the current file encoding. To solve the problem, I used a XmlTextReader, like this.
XmlTextReader rdr = new XmlTextReader(xmlFile);XmlDocument doc = new XmlDocument();
doc.Load(rdr);
And this solved the issue.
-f.