Please, test this is correct, thanks!
if (empty($str)) {\r
$this->xml = array();\r
} else {\r
- $str = utf8_encode($str);\r
+ if (empty($CFG->unicodedb)) {\r
+ $str = utf8_encode($str);\r
+ }\r
$this->xml = xmlize($str, 0);\r
}\r
$this->xml_root = $xml_root;\r
// encode htmlentities in JCloze
$this->encode_cdata($str, 'gap-fill');
// encode as utf8
- $str = utf8_encode($str);
+ if (empty($CFG->unicodedb)) {
+ $str = utf8_encode($str);
+ }
// xmlize (=convert xml to tree)
$this->xml = xmlize($str, 0);
}
$smarty->assign('course', $course);
$smarty->assign('lang', $this->lang);
$expout = $smarty->fetch('imsmanifest.tpl');
- echo utf8_encode($expout);
+ if (!empty($CFG->unicodedb)) {
+ echo $expout;
+ } else {
+ echo utf8_encode($expout);
+ }
return true;
}