X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/023c53f6c93c69b9d4f28eec8f57e9e335cfbd25..23a77ad01b96149db5e07121c09481dd1c5d9b4a:/unicode.plp diff --git a/unicode.plp b/unicode.plp index 9b77f7f..e2c3c11 100644 --- a/unicode.plp +++ b/unicode.plp @@ -1,34 +1,23 @@ -<: -use utf8; -use strict; -use warnings; -no warnings 'qw'; # that's not a comment, it's a NUMBER SIGN -use open IO => ':utf8'; - -our $VERSION = 'v1.0'; - -$header{content_type} = 'text/html; charset=utf-8'; +<(common.inc.plp)><: + our $VERSION = 'v1.0'; :> - + -digraph cheat sheet -<: - my %styles = map {$_ => $_} qw(dark circus mono red terse); - our $style = exists $get{style} && $styles{$get{style}} || 'light'; - printf(qq{\n}, - $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_ - ) for keys %styles; -:> +digraph cheat sheet + + +<:= stylesheet(qw'light dark red') :> +

Common uncommon Unicode

-

i^k in Vim. +

i^k in Vim. Also see the complete digraphs table.

@@ -38,14 +27,6 @@ my $diinfo = do 'digraphs.inc.pl'; my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} } sort { length $a <=> length $b } keys %$diinfo; -sub quote { - local $_ = shift; - s/"/"/g; - s//>/g; - return $_; -} - sub glyph_table { my ($digraphs) = @_; @@ -123,8 +104,8 @@ sub glyph_table { defined $name ? qq{ title="$name"} : '', @class ? sprintf(' class="%s"', join ' ', @class) : '', $colspan > 1 && qq{ colspan="$colspan"}, - $cell eq '' ? ' ' : quote($cell), - defined $code ? sprintf(' %s', quote($code)) + $cell eq '' ? ' ' : EscapeHTML($cell), + defined $code ? sprintf(' %s', EscapeHTML($code)) : length($cell) == 1 && $cell !~ /[a-z]/ ? sprintf(' %04X', 'value', ord $cell) : '', @@ -139,7 +120,7 @@ sub glyph_table { sub print_glyph_tables { while (@_) { - printf "

%s

\n\n", shift; + printf '

%s

'."\n\n", shift; while (ref $_[0] and $_ = shift) { print glyph_table($_); } @@ -154,8 +135,9 @@ print_glyph_tables( [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}], [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}], [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ . ◄ ► }], - [qw{. å ä ö ü ß . Å æ ø ű ſ}], + [qw{. å ä ö ü ß . ā æ ø ű ſ}], [qw{. ¿ ç ñ é ê è}], + [qw{. α β}], [qw{. א}], 'Signs', [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}], @@ -296,11 +278,13 @@ $verbose ? (