Lines Matching refs:utf8
189 * @param string $utf8 UTF-8 character
193 function utf82utf16($utf8) argument
197 return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
200 switch(strlen($utf8)) {
204 return $utf8;
209 return chr(0x07 & (ord($utf8{0}) >> 2))
210 . chr((0xC0 & (ord($utf8{0}) << 6))
211 | (0x3F & ord($utf8{1})));
216 return chr((0xF0 & (ord($utf8{0}) << 4))
217 | (0x0F & (ord($utf8{1}) >> 2)))
218 . chr((0xC0 & (ord($utf8{1}) << 6))
219 | (0x7F & ord($utf8{2})));
517 $utf8 = '';
527 $utf8 .= chr(0x08);
531 $utf8 .= chr(0x09);
535 $utf8 .= chr(0x0A);
539 $utf8 .= chr(0x0C);
543 $utf8 .= chr(0x0D);
553 $utf8 .= $chrs{++$c};
561 $utf8 .= $this->utf162utf8($utf16);
566 $utf8 .= $chrs{$c};
572 $utf8 .= substr($chrs, $c, 2);
579 $utf8 .= substr($chrs, $c, 3);
586 $utf8 .= substr($chrs, $c, 4);
593 $utf8 .= substr($chrs, $c, 5);
600 $utf8 .= substr($chrs, $c, 6);
608 return $utf8;