Hi!,
There is something I don't understand and for sure I am missing..
I want to save an XML with special characters inside (like æ, ø, etc).
I would use "utf-8" encoding, which in theory supports that.
But when XMLElement class writes the file, this "escapes" all that characters.
My expected behaviour is to get the file without escaping that. Is it possible?
Example:
If I execute this:
XmlElement elementList("RootTree"); XmlElement* element = new XmlElement("Element1"); element->addTextElement(String("aeiouåøæñ")); elementList.addChildElement(element); elementList.writeToFile( File::getCurrentWorkingDirectory().getChildFile ("test.xml"), "", "UTF-8");
I have this (in test.xml file):
<?xml version="1.0" encoding="UTF-8"?> <RootTree> <Element1 name1="value1">ññpåpø</Element1> </RootTree>
But I expect to have something like this:
<?xml version="1.0" encoding="UTF-8"?> <RootTree> <Element1 name1="value1">aeiouåøæñ</Element1> </RootTree>
Thanks!