1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Commit changes made for version 10.1

This commit is contained in:
Olivier Bertrand
2017-01-17 19:39:49 +01:00
parent 4314768150
commit 82913b0e90
30 changed files with 1740 additions and 185 deletions

View File

@@ -116,7 +116,9 @@ bool DOMDOC::ParseFile(PGLOBAL g, char *fn)
// Parse an in memory document
char *xdoc = GetMemDoc(g, fn);
b = (xdoc) ? (bool)Docp->loadXML((_bstr_t)xdoc) : false;
// This is not equivalent to load for UTF8 characters
// It is why get node content is not the same
b = (xdoc) ? (bool)Docp->loadXML((_bstr_t)xdoc) : false;
} else
// Load the document
b = (bool)Docp->load((_bstr_t)fn);
@@ -266,6 +268,7 @@ DOMNODE::DOMNODE(PXDOC dp, MSXML2::IXMLDOMNodePtr np) : XMLNODE(dp)
Nodep = np;
Ws = NULL;
Len = 0;
Zip = (bool)dp->zip;
} // end of DOMNODE constructor
/******************************************************************/
@@ -316,8 +319,10 @@ RCODE DOMNODE::GetContent(PGLOBAL g, char *buf, int len)
RCODE rc = RC_OK;
// Nodep can be null for a missing HTML table column
if (Nodep) {
if (!WideCharToMultiByte(CP_UTF8, 0, Nodep->text, -1,
if (Nodep) {
if (Zip) {
strcpy(buf, Nodep->text);
} else if (!WideCharToMultiByte(CP_UTF8, 0, Nodep->text, -1,
buf, len, NULL, NULL)) {
DWORD lsr = GetLastError();