Skip to content

Comment on Emoji Under the Hoodparent

Comments

If I type the following into ghci, I get the state flag of Texas:

putStrLn "\x1f3f4\xe0075\xe0073\xe0074\xe0078\xe007f"

The first character is a flag, the last character is a terminator, and in between are the tag characters corresponding to the ASCII for ustx. Just take those characters and subtract 0xe0000 from them, 0x75, 0x73, 0x74, 0x78.

https://en.wikipedia.org/wiki/Tags_(Unicode_block)

Edit:

Just for fun:

import Data.StateCodes

import Data.Char

putStrLn $ map (map toLower . show . snd) allStates >>=

\stateCode -> '\x1f3f4':map (toEnum . (0xe0000+) . fromEnum) ("us" ++ stateCode) ++ "\xe007f"

Yeah I understand how it works but none of the major vendors have actually implemented the emoji.

https://emojipedia.org/flag-for-texas-ustx/

Touché.

Oh my god they've put terminal escape codes into Unicode.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.