src/MarkdownIt/Common/Utils.php
public function fromCodePoint($c)
    {
        if ($c < 0x7F) // U+0000-U+007F - 1 byte
            return chr($c);
        if ($c < 0x7FF) // U+0080-U+07FF - 2 bytes
            return chr(0xC0 | ($c >> 6)) . chr(0x80 | ($c & 0x3F));
        if ($c < 0xFFFF) // U+0800-U+FFFF - 3 bytes
            return chr(0xE0 | ($c >> 12)) . chr(0x80 | (($c >> 6) & 0x3F)) . chr(0x80 | ($c & 0x3F));
        // U+010000-U+10FFFF - 4 bytes
        return chr(0xF0 | ($c >> 18)) . chr(0x80 | ($c >> 12) & 0x3F) .chr(0x80 | (($c >> 6) & 0x3F)) . chr(0x80 | ($c & 0x3F));
    }
public function fromCodePoint($c)
    {
        if ($c < 0x7F) // U+0000-U+007F - 1 byte
            return chr($c);
        if ($c < 0x7FF) // U+0080-U+07FF - 2 bytes
            return chr(0xC0 | ($c >> 6)) . chr(0x80 | ($c & 0x3F));
        if ($c < 0xFFFF) // U+0800-U+FFFF - 3 bytes
            return chr(0xE0 | ($c >> 12)) . chr(0x80 | (($c >> 6) & 0x3F)) . chr(0x80 | ($c & 0x3F));
        // U+010000-U+10FFFF - 4 bytes
        return chr(0xF0 | ($c >> 18)) . chr(0x80 | ($c >> 12) & 0x3F) .chr(0x80 | (($c >> 6) & 0x3F)) . chr(0x80 | ($c & 0x3F));
    }
public function fromCodePoint ( $ c ) { if ( $ c < 0x7F ) // U+0000-U+007F - 1 byte return chr ( $ c ) ; if ( $ c < 0x7FF ) // U+0080-U+07FF - 2 bytes return chr ( 0xC0 | ( $ c >> 6 ) ) . chr ( 0x80 | ( $ c & 0x3F ) ) ; if ( $ c < 0xFFFF ) // U+0800-U+FFFF - 3 bytes return chr ( 0xE0 | ( $ c >> 12 ) ) . chr ( 0x80 | ( ( $ c >> 6 ) & 0x3F ) ) . chr ( 0x80 | ( $ c & 0x3F ) ) ; // U+010000-U+10FFFF - 4 bytes return chr ( 0xF0 | ( $ c >> 18 ) ) . chr ( 0x80 | ( $ c >> 12 ) & 0x3F ) . chr ( 0x80 | ( ( $ c >> 6 ) & 0x3F ) ) . chr ( 0x80 | ( $ c & 0x3F ) ) ; }
UTF16 -> UTF8
@param integer $c
@return string
UTF16 - > UTF8