Lines Matching refs:k
5 function utf32_utf8($k) {
6 if ($k < 0x80) {
7 $retval = pack('C', $k);
8 } else if ($k < 0x800) {
10 0xc0 | ($k >> 6),
11 0x80 | ($k & 0x3f));
12 } else if ($k < 0x10000) {
14 0xe0 | ($k >> 12),
15 0x80 | (($k >> 6) & 0x3f),
16 0x80 | ($k & 0x3f));
17 } else if ($k < 0x200000) {
19 0xf0 | ($k >> 18),
20 0x80 | (($k >> 12) & 0x3f),
21 0x80 | (($k >> 6) & 0x3f),
22 0x80 | ($k & 0x3f));
23 } else if ($k < 0x4000000) {
25 0xf8 | ($k >> 24),
26 0x80 | (($k >> 18) & 0x3f),
27 0x80 | (($k >> 12) & 0x3f),
28 0x80 | (($k >> 6) & 0x3f),
29 0x80 | ($k & 0x3f));
32 0xfc | ($k >> 30),
33 0x80 | (($k >> 24) & 0x3f),
34 0x80 | (($k >> 18) & 0x3f),
35 0x80 | (($k >> 12) & 0x3f),
36 0x80 | (($k >> 6) & 0x3f),
37 0x80 | ($k & 0x3f));