参考文献

  • JavaScript’s internal character encoding: UCS-2 or UTF-16?

    UTF-16 (16-bit Unicode Transformation Format) is an extension of UCS-2 that allows representing code points outside the BMP. It produces a variable-length result of either one or two 16-bit code units per code point. This way, it can encode code points in the range from 0 to 0x10FFFF.

    JavaScript engines are free to use UCS-2 or UTF-16 internally. Most engines that I know of use UTF-16

    这真是一篇超级好的文章!