Why can’t I see the icon code ( ) in developer mode?

Asked

Viewed 120 times

7

Example of this icon:

In developer mode (F12, Google Chorme), I can’t see the code of this icon, only image appears. Why does this happen ? Has some secret ?

See the image below:

inserir a descrição da imagem aqui

Instead of displaying image ( ), you should not show code "&#10060" ?

  • 1

    What do you mean, code? The symbol is a normal character.

  • @LINQ is telling me that this icon is a character ? There is a link showing all the codes of each icon: https://apps.timwhitlock.info/emoji/tables/unicode#note4

  • 1

    It is a Unicode character, this link has all

  • 1

    @Matheusmiranda goes to the console and put '❌'.charCodeAt(); the return will be 10060 which is the code: &#10060

  • @Noobsaibot that bizarre, that I did not know !!!

  • Why not show code in developer mode ? Example: &#10060, should not show "&#10060" in developer mode ?

  • @LINQ should not show "&#10060" on F12 ?

  • @Matheusmiranda There only who made the browser that can answer, but in my view should not. The letter a shows code 97 in the cited resource?

  • @LINQ, Yes, as code 97

  • I don’t know if I get it. You’re saying that when you click F12 (on inspect element) all characters are presented as Unicode codes?

  • @LINQ, I got it wrong, it actually shows how a even.

  • @LINQ so the letter A is the same as ? , ie the 2 are of the character type. I’m so confused.

  • @Matheusmiranda NO! Both are characters, as well as ன, ᄧ, ᖄ, and several others

  • @LINQ killed my doubt. I thought this icon was something else.

  • 1

    @Matheusmiranda Great! That’s what we’re there for.

Show 10 more comments

1 answer

6


For this case, the Unicode standard is used (note that is not a encoding). Simply put, it is a key and value mapping between characters and their Unicode codes (or code points).

Just like in the screenshot you posted, all the characters in our alphabet are shown normally, so are the emojis. In Unicode, both the letter a as to the are characters.

console.log(`a == ${'a'.charCodeAt()}`)
console.log(` == ${''.charCodeAt()}`)

The greatest application of Unicode is to be able to support various alphabets such as Latin, Greek, Glagolitic, Cyrillic and others using the same pattern.

According to the W3, all browsers, modern operating systems, and encodings use Unicode internally.

  • 1

    @Matheusmiranda Think of Unicode as a large table: for each character, there is a corresponding number. For the letter a, the number is 97, for the emoji "smiley face with glasses", is 55358, for the "red X" is 10060, etc. The difference is that emojis allow greater freedom to be represented in thousands of different ways - Just see how each emoji has a different design in each system, for example; the Unicode code (the number) is the same, but the representation (the drawing) varies. To learn more, see this article

  • 1

    @hktsubo good to know, I will read in this article and kill all my doubts, thank you !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.