[xml bugfix] xml encoding bugfix
This commit is contained in:
@ -136,6 +136,9 @@ int ObExprPrivXmlBinary::eval_priv_xml_binary(const ObExpr &expr, ObEvalCtx &ctx
|
|||||||
} else {
|
} else {
|
||||||
xml_root = static_cast<ObIMulModeBase *>(xml_doc);
|
xml_root = static_cast<ObIMulModeBase *>(xml_doc);
|
||||||
ObString res_string;
|
ObString res_string;
|
||||||
|
if (!xml_doc->get_encoding().empty() || xml_doc->get_encoding_flag()) {
|
||||||
|
xml_doc->set_encoding(ObXmlUtil::get_charset_name(ObCollationType::CS_TYPE_UTF8MB4_BIN));
|
||||||
|
}
|
||||||
if (OB_FAIL(xml_root->get_raw_binary(res_string, &tmp_allocator))) {
|
if (OB_FAIL(xml_root->get_raw_binary(res_string, &tmp_allocator))) {
|
||||||
LOG_WARN("failed to get xml binary", K(ret), K(xml_plain_text));
|
LOG_WARN("failed to get xml binary", K(ret), K(xml_plain_text));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user