2026-02-22 12:05 UTC
@helloyanis @emmatyping
How does
'π¦' > 'πΊ' == True
make sense?
Computers are narrow-minded, and do numbers only. Humans don't like numbers much, and wrote all the letters and glyphs they wanted to use with computers on a huge list, and gave every letter a unique number, and called that a "Unicode codepoint" to sound really smart.
The codepoint of FOX FACE (π¦) is 129418, and the codepoint of WOLF FACE (πΊ) is 128058.
If I'm asking the lightning-infused rock to compare two single characters, which both emojis really are, it will first implicitly look up their respective codepoints, and compare those numbers. 129418 > 128058 is patently true.
Γons ago, with ASCII, people did a lot of clever things with those "codepoints", like switching between upper and lower case by flipping a single bit of a character, until this broke hilariously with umlauts and their ilk.
"Don't bit-bang or numerically work with ASCII!" is the cautionary tale.
Replies (1)
-
@helloyanis@furries.club 2026-02-22 12:16
@Gyroplast @emmatyping After fiddling around, strangely, running "π¦" == 12948 returns false. Also, it seems like emojis are always greater than strings with just letters in them, no matter the string length. But the len of "π¦" seems to be only 1 which makes sense, but then why is π¦ greater than "aaaaaaaaaaaa..." ? That's confusing!