]> git.mjollnir.org Git - moodle.git/commitdiff
for consistency, use 0x80 instead of 128 in hotpot_charcode_to_utf8()
authorGordon Bateson <gordon@kanazawa-gu.ac.jp>
Mon, 14 Dec 2009 03:29:33 +0000 (03:29 +0000)
committerGordon Bateson <gordon@kanazawa-gu.ac.jp>
Mon, 14 Dec 2009 03:29:33 +0000 (03:29 +0000)
question/format/hotpot/format.php

index a9fdc7246748f51d7d170c4b47946e49e1c7240f..04847adb052f0288e2a30eccbe1f20245c3ff27a 100644 (file)
@@ -517,7 +517,7 @@ function hotpot_charcode_to_utf8($charcode) {
     }
     if ($charcode <= 0x7FF) {
         // 2-byte char
-        return chr(($charcode >> 0x06) + 0xC0).chr(($charcode & 0x3F) + 128);
+        return chr(($charcode >> 0x06) + 0xC0).chr(($charcode & 0x3F) + 0x80);
     }
     if ($charcode <= 0xFFFF) {
         // 3-byte char