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.
What do you mean, code? The symbol is a normal character.
– Jéf Bueno
@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
– Matheus Miranda
It is a Unicode character, this link has all
– Jéf Bueno
@Matheusmiranda goes to the console and put
'❌'.charCodeAt();
the return will be10060
which is the code:❌
– NoobSaibot
@Noobsaibot that bizarre, that I did not know !!!
– Matheus Miranda
Why not show code in developer mode ? Example: ❌, should not show "❌" in developer mode ?
– Matheus Miranda
@LINQ should not show "❌" on F12 ?
– Matheus Miranda
@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?– Jéf Bueno
@LINQ, Yes, as code 97
– Matheus Miranda
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?
– Jéf Bueno
@LINQ, I got it wrong, it actually shows how
a
even.– Matheus Miranda
@LINQ so the letter A is the same as ? , ie the 2 are of the character type. I’m so confused.
– Matheus Miranda
@Matheusmiranda NO! Both are characters, as well as ன, ᄧ, ᖄ, and several others
– Jéf Bueno
@LINQ killed my doubt. I thought this icon was something else.
– Matheus Miranda
@Matheusmiranda Great! That’s what we’re there for.
– Jéf Bueno