[libxml++] UTF-8



Hi,

I have a problem with utf-8. I'm using personal compilation of GLibmm 2.12.10
Here is my code:

xmlpp::Document* d;
       
d = new xmlpp::Document();
xmlpp::Element* n;
    
n = d->create_root_node("root","","");

n->add_child("child1","");
n->add_child("child2","");
n->add_child("child3","");
n->add_child("child4","");

n->set_attribute("att1","valeur avec é etc","");
n->set_attribute("att2","valeur avec ê etc","");
n->set_attribute("att3","valeur avec   etc","");

d->write_to_file_formatted("c:\\test.xml","UTF-8");

Remarks about output file:
I tried to open the xml with explorer and I have bad characters in place of "é" and "ê".

Did I do any error in my code?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]