lib/unicode.c
/* Returns the unicode code point corresponding to leading surrogate 'leading'
 * and trailing surrogate 'trailing'.  The return value will not make any
 * sense if 'leading' or 'trailing' are not in the correct ranges for leading
 * or trailing surrogates. */
Returns the unicode code point corresponding to leading surrogate 'leading'
and trailing surrogate 'trailing'.  The return value will not make any
sense if 'leading' or 'trailing' are not in the correct ranges for leading
or trailing surrogates.
Returns the unicode code point corresponding to leading surrogate ' leading ' and trailing surrogate ' trailing ' . The return value will not make any sense if ' leading ' or ' trailing ' are not in the correct ranges for leading or trailing surrogates .
int
utf16_decode_surrogate_pair(int leading, int trailing)
{
    int w = (leading >> 6) & 0xf;
    int u = w + 1;
    int x0 = leading & 0x3f;
    int x1 = trailing & 0x3ff;
    return (u << 16) | (x0 << 10) | x1;
}
int utf16_decode_surrogate_pair ( int leading , int trailing ) { int w = ( leading >> 6 ) & 0xf ; int u = w + 1 ; int x0 = leading & 0x3f ; int x1 = trailing & 0x3ff ; return ( u << 16 ) | ( x0 << 10 ) | x1 ; }
Returns the unicode code point corresponding to leading surrogate 'leading'
 and trailing surrogate 'trailing'.
Returns the unicode code point corresponding to leading surrogate ' leading ' and trailing surrogate ' trailing ' .
/*
     *  Leading surrogate:         110110wwwwxxxxxx
     * Trailing surrogate:         110111xxxxxxxxxx
     *         Code point: 000uuuuuxxxxxxxxxxxxxxxx
     */