love, play & inquiry (trochee) wrote,
love, play & inquiry
trochee

  • Mood:

[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.

Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment