Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

special characters (emoticons) in text file

I have a txt file of an conversation exported from WhatsApp. WhatsApp supports emoticons in their conversation, and the exported conversation also, to my surprise, contains these emoticons! That is, if I open the text file in a text editor (Text Wrangler on Mac 10.8) I can see the emoticons. The text file is encoded in UTF-8 and there are no resources associated with the file that I can tell.

Can anyone explain to me how these emoticons are being included in the text file and how they are accurately being interpreted by the Text Editor? Is this related to the character encoding at all? Are extra resources included with the text file?

like image 638
Sean Connolly Avatar asked Sep 30 '13 09:09

Sean Connolly


People also ask

How do I add emojis to a text file?

To open the emoji keyboard dialog, start by typing the β€œ:” character, and then the name of the emoji (β€œsmile” for example). You can then navigate the dialog that opens with arrow keys and the return key to select the emoji you need.

Does UTF 8 include emojis?

Emojis are also characters from the UTF-8 alphabet: πŸ˜„ is 128516.

Are emojis Ascii or Unicode?

Because emoji characters are treated as pictographs, they are encoded in Unicode based primarily on their general appearance, not on an intended semantic.


1 Answers

Unicode contains sections which specify emoji as "characters". They're regular characters, you only need a font which can display them. Also see the Unicode Emoji FAQ.

In a text file, characters are basically encoded as numbers in the form of bytes. To display those visually on a computer screen you need a font which contains the visual glyph to render this character. Since the process is always numeric identifier β†’ font β†’ visible glyph, it should be pretty obvious that a "character" can be anything visual, including emoji or any other image.

character viewer

like image 88
deceze Avatar answered Oct 04 '22 20:10

deceze