From: Rainer S. <Rai...@so...> - 2003-12-02 15:55:12
|
I use libxml++ in a application dealing with iso-8859-2. When creating a xmlpp::Document including special characaters (valid within iso8859-2) the method-call document.write_to_string("iso-8859-2") (see code below) puts a error message to stdout: output conversion failed due to conv error Bytes: 0xB5 0x72 0x61 0x69 and the resulting xml-string is corrupted (truncated at the postion of the special character (Dec 174) What is the problem ? Do i use libxml++ in a wrong manner ? Rainer code fragment: ------------------------------------------------------------ xmlpp::Document document; xmlpp::Element* xmlPNode = document.create_root_node(theCommand+XML_CM_REQUEST); xmlPNode->add_attribute(XML_MA_XMLNS, XML_NAMESPACE_VALUE); xmlNode = xmlPNode->add_child(XML_NN_TASK); xmlNode->set_child_content(getHeaderAttr(OH_TASK_ID)); xmlNode->add_attribute(XML_MA_NAMESPACE, ourNamespace); xmlNode->add_attribute(XML_MA_VERSION, ourVersion); theRequest = document.write_to_string("iso-8859-2"); -- -------------------------------------------------------------------------- Software Factory GmbH mailto:Rai...@so... Panoramastr. 47, 73084 Salach phone : +49 7162 460592 o technical software development fax : +49 7162 460593 o system engineering mobile : +49 172 6714084 o consulting www : http://www.so-fa.de -------------------------------------------------------------------------- |