trochee: (bithead)
trochee ([personal profile] trochee) wrote2004-06-16 10:59 am

[geekery] Unicode character names and Perl

"Hmm," I thought. "What's the longest character name in Unicode?"*

Turns out the answer** is ﯹ, or u+fbf9, also known as ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM. (We have a winnah!)

This is the one-liner I wrote to find it:

perl -mcharnames -MList::Util=reduce -le 'print reduce { length $a > length $b ? $a : $b } map { charnames::viacode($_) } 0 .. 0xffff'

The charnames and List::Util modules are quite handy for this sort of research.

* I actually had a good reason to ask this question, but that's a story for another time.

** Actually, this might be one of several that tie for the title.

[identity profile] solri.livejournal.com 2004-06-16 02:53 pm (UTC)(link)
perl -mcharnames -MList::Util=reduce -le 'print reduce { length $a > length $b ? $a : $b } map { charnames::viacode($_) } 0 .. 0xffff'

I want to have your babies.