]> git.mjollnir.org Git - moodle.git/commitdiff
Only decode from utf8 if we aren't running under utf8.
authorstronk7 <stronk7>
Tue, 28 Mar 2006 19:22:35 +0000 (19:22 +0000)
committerstronk7 <stronk7>
Tue, 28 Mar 2006 19:22:35 +0000 (19:22 +0000)
Please test it. Thanks!

question/format/hotpot/format.php

index 3b24468ee2dc8aa05066cedafd74d9c998ab9df4..0c2b2c9f7ad759c29a681c2e08a5d308b1dc7308 100644 (file)
@@ -486,7 +486,9 @@ class hotpot_xml_tree {
         eval('$value = &$this->xml'.$this->xml_root.$tags.$more_tags.';');
 
         if (is_string($value)) {
-            $value = utf8_decode($value);
+            if (empty($CFG->unicodedb)) {
+                $value = utf8_decode($value);
+            }
 
             // decode angle brackets and ampersands
             $value = strtr($value, array('&#x003C;'=>'<', '&#x003E;'=>'>', '&#x0026;'=>'&'));