Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 25, 2021 03:37 pm GMT

Removing people using UTF-8

While I was writing my new article I found out about really cool thing I am going to share with you.

Check out this emoji containing 4 people .

While I was trying to delete in VSCode using backspace it
didn't disappear, but it just changed to this . After hitting another backspace it changed to then to and then it finally disappeared. So it goes

       

Why this happens?

When we look on the decoded symbols, we can see that the symbols are equal to this in hex:

:  0x1f469 0x200d 0x1f469 0x200d 0x1f466 0x200d 0x1f466:  0x1f469 0x200d 0x1f469 0x200d 0x1f466:    0x1f469 0x200d 0x1f469:   0x1f469

While 0x200d character is a "ZERO WIDTH JOINER" which tells the renderer, that the preceding and following characters should join each other.

So it is like + + + .

Cool isn't it?

PS:

Removing of single woman works as well, so this can transformed to the hex code like this: 0x1f469 0x200d 0x1f466 0x200d 0x1f466


Original Link: https://dev.to/jancizmar/removing-people-using-utf-8-3d2f

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To