Converting text to Unicode in javascript

前端 未结 3 903
自闭症患者
自闭症患者 2020-12-17 06:51

I have the following:

function showUnicode()
{
  var text = prompt( \'Enter the wanted text\', \'Unicode\' ),
      unicode = 0,
      ntext,
      temp,
            


        
3条回答
  •  有刺的猬
    2020-12-17 07:24

    JavaScript uses UCS-2 internally.

    This means that supplementary Unicode symbols are exposed as two separate code units (the surrogate halves). For example, '

提交回复
热议问题