Oddbean new post about | logout
 @40275da3 @38bc5aa1 @874ff3d1 Define “modern”…

https://files.mastodon.social/media_attachments/files/111/173/550/661/072/299/original/177f8e06a239eac2.png 
 @a6ff0b2b @38bc5aa1 @874ff3d1 What is that, I first thought AppleScript, but that doesn't seem to be it? Funny that you have to import "utf8" to get unicode 🙂
(To be fair, even C can do the right thing calling the corresponding ICU function. It is just #SwiftLang that defaults to it, and I'm still not sure whether this is actually a gain given all the drawbacks) 
 @40275da3 @38bc5aa1 @874ff3d1 It’s Perl, which predates UTF-8, but has always had one of the best and most complete set of Unicode-related features. That “use” line at the top actually just declares that the *source code* in this file is in UTF-8 encoding. https://perldoc.perl.org/utf8 
 @a6ff0b2b @40275da3 @38bc5aa1 @874ff3d1 Different character. The test was "🤦🏼‍♂️" (U+1F926 U+1F3FC U+200D U+2642 U+FE0F) not "🤦" (U+1F926). My copy of Perl (which is admittedly old) prints 5 for the first, not 1. 
 @f9f64f99 @40275da3 @38bc5aa1 @874ff3d1 Ah, yeah, Perl will need a little help there, for legacy reasons. But just a little! A one-line function should do it, I think.

https://files.mastodon.social/media_attachments/files/111/176/816/123/001/070/original/825fb44e98204de9.png