4 ms·
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 las
by mannerheim 6y ago
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) 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"
- azornathogron 6y agoOh my god they've put terminal escape codes into Unicode.
- petepete 6y agoYeah I understand how it works but none of the major vendors have actually implemented the emoji. https://emojipedia.org/flag-for-texas-ustx/ https://emojipedia.org/flag-for-texas-ustx/
- mannerheim 6y agoTouché.