Only convert to UTF8 if we aren't running under UTF8.

Please, test this is correct, thanks!
This commit is contained in:
stronk7
2006-03-28 18:53:16 +00:00
parent 1d5a7c4b0a
commit ef138cea77
3 changed files with 11 additions and 3 deletions
+3 -1
View File
@@ -1255,7 +1255,9 @@ class hotpot_xml_tree {
if (empty($str)) {
$this->xml = array();
} else {
$str = utf8_encode($str);
if (empty($CFG->unicodedb)) {
$str = utf8_encode($str);
}
$this->xml = xmlize($str, 0);
}
$this->xml_root = $xml_root;
+3 -1
View File
@@ -472,7 +472,9 @@ class hotpot_xml_tree {
// 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);
}
+5 -1
View File
@@ -387,7 +387,11 @@ function handle_questions_media(&$questions, $path, $courseid) {
$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;
}