© Moritz Lenz 2017

Moritz Lenz, Perl 6 Fundamentals , https://doi.org/10.1007/978-1-4842-2899-9_11

11. A Unicode Search Tool

Moritz Lenz

(1)Fürth, Bayern, Germany

Every so often, I have to identify or research some Unicode characters. There’s a tool called uni 1 in the Perl 5 distribution App::Uni,2 developed by Audrey Tang and Ricardo Signes.

Let’s reimplement its basic functionality in a few lines of Perl 6 code and use that as an occasion to talk about Unicode support in Perl 6.

If you give it one character on the command line, it prints out a description of the following character:

$ uni њњ - U+0045a - CYRILLIC SMALL LETTER NJE

If you give it a longer string instead, it searches in the list of Unicode character names and prints out the same information ...

Get Perl 6 Fundamentals : A Primer with Examples, Projects, and Case Studies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.