diff options
| author | David Leadbeater | 2014-10-14 13:07:32 +0100 |
|---|---|---|
| committer | David Leadbeater | 2014-10-14 13:07:32 +0100 |
| commit | 2b01fd9e9ab8fb490a167eb3a8d7b2cde4e5f4f6 (patch) | |
| tree | 9f3170406f72658e27d3dad4979349039c6b3569 /scripts | |
| parent | fb97387fbd4604e2b3c95cb421276ca43b181cab (diff) | |
| parent | e1039166caf895ff5d8f75ffaaa4a144bc9b4c14 (diff) | |
| download | scripts.irssi.org-2b01fd9e9ab8fb490a167eb3a8d7b2cde4e5f4f6.tar.bz2 | |
Merge pull request #54 from pierrot14/update_unicode
Update unicode.pl
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/unicode.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/unicode.pl b/scripts/unicode.pl index 01ff7bf..5e883a1 100644 --- a/scripts/unicode.pl +++ b/scripts/unicode.pl @@ -14,7 +14,7 @@ use POSIX (); use Unicode::UCD qw(charblock charblocks charinfo); use Irssi qw(command_bind command_bind_first); -our $VERSION = "1"; +our $VERSION = "2"; our %IRSSI = ( authors => 'David Leadbeater', contact => 'dgl@dgl.cx', @@ -166,6 +166,7 @@ sub print_info { for(qw(decimal digit numeric upper lower title)) { $extra{$_} = $info->{$_} if $info->{$_}; } + $extra{"utf-8 (hex)"} = join "", map sprintf("\\x%02x", ord), split //, encode_utf8 chr(hex $info->{code}); p " " x (7 + length $info->{code}), join(", ", map { "$_=$extra{$_}" } sort keys %extra); } } @@ -204,3 +205,8 @@ sub pipe_input { $pipe_in_progress = 0; $parent->($line); } + +command_bind charblocks => sub { + my @blocks = sort keys %{charblocks()}; + print for @blocks; +} |
