This perl one-liner uses Perl/Tk 804+ to show all available unicode characters on the system.
perl -MTk -e '$mw=tkinit;$txt=$mw->Scrolled("Text")->pack(-fill=>"both +",-expand=>1);$txt->insert("end",join "", map { $_ . " " . chr($_) . + "\n" } 32 .. 10000); MainLoop'

Replies are listed 'Best First'.
Re: Show all unicode characters
by TimToady (Parson) on Aug 20, 2004 at 21:18 UTC
    Here's what I use to grep the Unicode character database. It definitely makes some unwarranted assumptions about the structure of the library, but hey, it works for me...
    #!/usr/bin/perl -C binmode STDOUT, ":utf8"; $pat = "@ARGV"; if (ord $pat > 256) { $pat = sprintf("%04x", ord $pat); } elsif (ord $pat > 128) { # arg in sneaky UTF-8 $pat = sprintf("%04x", unpack("U0U",$pat)); } @names = split /^/, do 'unicore/Name.pl'; for (@names) { if (/$pat/io) { $hex = hex($_); print chr($hex),"\t",$_; } }
    I call it "uni", by the way.
Re: Show all unicode characters
by ysth (Canon) on Aug 20, 2004 at 15:20 UTC
    Why stop at "\N{UPPER RIGHT PENCIL}"? There are interesting characters up through 0x2ffff so far. Try something like (untested):
    map { use 5.008; use charnames (); my $name = charnames::viacode($_); +$name ? ("$name ($_): ".chr($_)."\n") : () } 32..0x2ffff;
    to show the names and filter out the unused code points. (Probably will slow it down a lot, though. Going directly to Unicode::UCD would be faster.)
      Why stop at "\N{UPPER RIGHT PENCIL}"?
      I just did not look into the docs for the highest unicode codepoint.