I am creating new version of old software (written in different language) which must be compatible, and more precisely export and import should work between them.
Old soft XML file in notepad++:
My XML created in C# also in notepad++:
Code to generate this XML:
XAttribute rootName = new XAttribute("Name", "");
XElement root = new XElement("Template", rootName);
root.Add(new XElement("CODE", "JP„"));
var document = new XDocument(new XDeclaration("1.0", "ISO-8859-1", "yes"), root);
The special character in my xml is encoded incorrect. It makes me dizzy, because it should be in ISO-8859-1 encoding, even notepad++ shows that file has this encoding.
How can I force my XML to treat special characters like the old one?