correct UTF8 handling for FILTERXML, fdo#72427

Change-Id: Ie0a5824ddbc3e75a1bb22121e620378ad3e0dfde
This commit is contained in:
Markus Mohrhard
2013-12-07 06:57:57 +01:00
parent bd976e5b07
commit 62174f6a8d

View File

@@ -89,19 +89,19 @@ void ScInterpreter::ScFilterXML()
xmlNsPtr ns = (xmlNsPtr)pNodeSet->nodeTab[0];
xmlNodePtr cur = (xmlNodePtr)ns->next;
boost::shared_ptr<xmlChar> pChar2(xmlNodeGetContent(cur), xmlFree);
aResult = OUString::createFromAscii((char*)pChar2.get());
aResult = OStringToOUString(OString((char*)pChar2.get()), RTL_TEXTENCODING_UTF8);
}
else if(pNodeSet->nodeTab[0]->type == XML_ELEMENT_NODE)
{
xmlNodePtr cur = pNodeSet->nodeTab[0];
boost::shared_ptr<xmlChar> pChar2(xmlNodeGetContent(cur), xmlFree);
aResult = OUString::createFromAscii((char*)pChar2.get());
aResult = OStringToOUString(OString((char*)pChar2.get()), RTL_TEXTENCODING_UTF8);
}
else
{
xmlNodePtr cur = pNodeSet->nodeTab[0];
boost::shared_ptr<xmlChar> pChar2(xmlNodeGetContent(cur), xmlFree);
aResult = OUString::createFromAscii((char*)pChar2.get());
aResult = OStringToOUString(OString((char*)pChar2.get()), RTL_TEXTENCODING_UTF8);
}
}
else