getting a string length that contains unicode character exceeding 0xffff

前端 未结 4 1597
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 06:23

I’m using this character, double sharp \'

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-14 07:03

    Javascript (and Java) strings use UTF-16 encoding.

    Unicode codepoint U+0046 (F) is encoded in UTF-16 using 1 codeunit: 0x0046

    Unicode codepoint U+1D12A (

提交回复
热议问题