4 ms·
If you have a textbox on the internet, eventually some special snowflake will put emoji into it. And one day, you'll wake up to your backend systems on fire, be
by theandrewbailey 10y ago
If you have a textbox on the internet, eventually some special snowflake will put emoji into it. And one day, you'll wake up to your backend systems on fire, because someone decided that their name was the smiling pile of poop emoji.[0] (Are your backend systems jealous that someone else is named that?)
I've recently needed to make some fields emoji-proof. This seems like a great resource for testing. Thanks for sharing.
[0] http://emojipedia.org/pile-of-poo/ http://emojipedia.org/pile-of-poo/
- afandian 10y agoHappened to me. It uncovered Java's handling of surrogate pairs. I fixed my code, because it was technically broken before. http://stackoverflow.com/questions/42457416/jq-cant-parse-an-unicode-emoji-character-is-it-valid-json http://stackoverflow.com/questions/42457416/jq-cant-parse-an...
- danso 10y agoReminds me of when I wrote an app to track and store tweets about a given hashtag. Worked fine in its first few months, then started throwing encoding errors right around the time Twitter enabled emoji support. I was using MySQL as a data store and was ignorant to the fact that UTF8 encoding in MySQL only uses 3 bytes. I was ignorant about encoding in general but thought that UTF8 always meant 4-bytes. Apparently so did many other MySQL users, and it was bad enough that MySQL questions on Stackoverflow are already filled with erroneous info about all kinds of encoding issues. The search for the fix -- which is that MySQL has a utf8mb4 encoding for 4-bytes -- was probably the most frustrating debugging exercise in my career. Even worse was the eventual revelation that the MySQL devs were technically right -- the UTF8 spec says nothing about requiring 4 bytes, and 3 bytes probably seemed sensible enough in terms of efficiency at the time of MySQL 4.
- rootlocus 10y agoFrom RFC-3629 [1] (the UTF8 spec), on page 4: In UTF-8, characters from the U+0000..U+10FFFF range (the UTF-16 accessible range) are encoded using sequences of 1 to 4 octets. It would be absurd for an encoding that's used by 88.9% of the web [2] to be implemented in a way that doesn't respect the standard. [1] https://tools.ietf.org/html/rfc3629#page-5 https://tools.ietf.org/html/rfc3629#page-5 [2] https://www.wikiwand.com/en/UTF-8 https://www.wikiwand.com/en/UTF-8
- tombrossman 10y agoNever mind the internet, users will lock themselves out of their own computer: https://apple.stackexchange.com/questions/202143/i-included-emoji-in-my-password-and-now-i-cant-log-in-to-my-account-on-yosemite https://apple.stackexchange.com/questions/202143/i-included-...
- afandian 10y agoUsers? That looks like Apple's fault for allowing that asymmetry in Mac OS.
- TazeTSchnitzel 10y agoI am thankful for emoji's existence in part because it's forcing Western app developers to actually support non-BMP Unicode codepoints.