Permalink
Browse files

for consistency, use 0x80 instead of 128 in hotpot_charcode_to_utf8()

  • Loading branch information...
1 parent 6bb0533 commit 811fab85a72879491d6ad3bf73e75edba2fcda04 @gbateson gbateson committed Dec 14, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/format/hotpot/format.php
@@ -555,7 +555,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

0 comments on commit 811fab8

Please sign in to comment.