in reply to how can I get a list of all unicode characters that have a certain attribute?

If you want to do it for all codepoints supported/known by the current perl, this is quite efficient:
#!/usr/bin/perl

use strict;
use warnings;

binmode STDOUT, ":utf8";

sub Names ()
{
    do "unicore/Name.pl";
    } # Names

my (%name, %cp, $n);
for (split m/\n/ => Names ()) {
    s/\s+$//;
    my ($cp, $cp2, $name) = split m/\t/, $_, 3;
    $name =~ m/a-z/ and next;	# Non-character
    ($cp, $cp2) = map { hex "0$_" } ($cp, $cp2);
    $name{$cp} = $name;
    $cp{$name} //= $cp;
    }

my @codepoints = sort { $a <=> $b } keys %name;
my $ncp = @codepoints;
print "Testing $ncp codepoints\n";

foreach my $cp (@codepoints) {
    my $chr = chr $cp;  # int-2-char conversion
    $chr =~ m/\p{Cyrillic}/ or next;
    printf "U+%04X %s\t%s\n", $cp, $chr, $name{$cp};
    }

Enjoy, Have FUN! H.Merijn
  • Comment on Re: how can I get a list of all unicode characters that have a certain attribute?