[libxml++] UTF-8
- From: "Fabian Jacquet" <fabian jacquet gmail com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: [libxml++] UTF-8
- Date: Wed, 20 Jun 2007 10:16:16 +0200
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:
- No UTF-8 header "0xEF BB BF"
- "é etc" is coded like this "0xE9 A0 A5 74 63". I think 0x20 is missing for the space, I'm not sure "é" is correctly coded, "e" from "etc" is missing
- "ê etc" is coded like this "0xEA A0 A5 74 63". Same remarks
- " etc" is coded like this "0x20 20 65 74 63"
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]