为什么会这样:
> String.fromCharCode(0xd7FF)
''
> String.fromCharCode(0xd800)
'�'
> String.fromCharCode(0xdffe) // (and everything in between)
'�'
> String.fromCharCode(0xdfff)
'�'
> String.fromCharCode(0xe000)
''
DFFF₁₆ 是 55296₁₀。我得到相同的结果String.fromCodePoint()
。