Detecting individual Unicode character support with JavaScript

后端 未结 5 795
遇见更好的自我
遇见更好的自我 2020-12-05 04:24

Is it possible to detect if the client supports a particular Unicode character or if it will be rendered as a missing glyph box?

Important: Support in as many browser

5条回答
  •  长情又很酷
    2020-12-05 05:30

    You can always evaluate each character using the charCodeAt() method. This will return the unicode character value. Depending on what you are doing, you can restrict the range of which you want to accept as "Valid" characters... If you copy the character that's in the "box", you can use a character translator on the web to see what the corresponding unicode value is.

    Here's one that I googled and found: enter link description here

提交回复
热议问题