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 | |
| parent | fb97387fbd4604e2b3c95cb421276ca43b181cab (diff) | |
| parent | e1039166caf895ff5d8f75ffaaa4a144bc9b4c14 (diff) | |
| download | scripts.irssi.org-2b01fd9e9ab8fb490a167eb3a8d7b2cde4e5f4f6.tar.bz2 | |
Merge pull request #54 from pierrot14/update_unicode
Update unicode.pl
| -rw-r--r-- | _data/scripts.yaml | 2 | ||||
| -rw-r--r-- | scripts/unicode.pl | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/_data/scripts.yaml b/_data/scripts.yaml index 886298a..29a0b31 100644 --- a/_data/scripts.yaml +++ b/_data/scripts.yaml @@ -4248,7 +4248,7 @@ modified: "2014-07-06" license: "WTFPL" name: "unicode" - version: "1" + version: "2" - authors: "David Leadbeater" contact: "dgl@dgl.cx" 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; +} |
