A modest emoji diversity proposal
written November 6, 2016
Emoji should repersent everyone. Fortuently, I've come up with a way to encode any number of people of any race, gender, and sexuality doing whatever action can be imagined. For this encoding scheme, we're going to need a lot of signaling characters, so I've booked out a block of plane 14 for this: U+E0200 to U+E0301.
Hold on to your hats, here's the character list:
U+E0200 - ARBITRARY EMOJI BYTE 00 U+E0201 - ARBITRARY EMOJI BYTE 01 U+E0202 - ARBITRARY EMOJI BYTE 02 ... U+E02FD - ARBITRARY EMOJI BYTE FD U+E02FE - ARBITRARY EMOJI BYTE FE U+E02FF - ARBITRARY EMOJI BYTE FF U+E0300 - ARBITRARY EMOJI BEGIN
To encode your custom emoji, simply use the image editor of your choice to create a PNG file repersenting your picture. Then, for each byte in the PNG file, pick the corresponding codepoint according to the formula
codepoint = byte | 0xe0200. Prefix this with U+E0300 and there you go.
To parse this emoji, once reading the U+E0300 character, parse each ARBITRARY EMOJI BYTE character until a non-ARBITARY EMOJI BYTE character is seen or the input ends. Then, decode each character to a byte according to the forumla
byte = codepoint & 0xff and treat the series of bytes as a PNG file.
Loose ARBITRARY EMOJI characters cause undefined behavior, which is always fun.
I write some Python code to encode this, but the geniuses at Python decided to prevent me from writing undefined unicode characters and I'm too lazy to hand-code UTF8 bytes.
GRANT MONEY PLEASE.