X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/3a44f7513defe91c62161807a1ad9a7646155846..f63a57e71a3aed6fe5e80ca979186e3bd6c7eb6b:/unicode.plp diff --git a/unicode.plp b/unicode.plp index da5b6e8..bc3ee70 100644 --- a/unicode.plp +++ b/unicode.plp @@ -1,25 +1,19 @@ -<: -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 = '1.0'; - -$header{content_type} = 'text/html; charset=utf-8'; +<(common.inc.plp)><: + our $VERSION = 'v1.0'; :> - + -digraph cheat sheet - +digraph cheat sheet + + +<:= stylesheet(qw'light dark red') :> - +

Common uncommon Unicode

i^k in Vim. @@ -30,15 +24,7 @@ Also see the complete digraphs table.

<: my $diinfo = do 'digraphs.inc.pl'; my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} } - keys %$diinfo; - -sub quote { - local $_ = shift; - s/"/"/g; - s//>/g; - return $_; -} + sort { length $a <=> length $b } keys %$diinfo; sub glyph_table { my ($digraphs) = @_; @@ -75,8 +61,7 @@ sub glyph_table { next; } - my $code = join '', map { $di{ord $_} || '' } split //, $cell; - my $name = $diinfo->{$code}->[1]; + my ($code, $name); # determine display class my @class; @@ -92,11 +77,18 @@ sub glyph_table { push @class, 'di-rare'; # discouraged } - if ($code) { + $code = join '', map { $di{ord $_} || '' } split //, $cell; + $name = $diinfo->{$code}->[1]; + length $code == 2 or undef $code; + + if (defined $code) { push @class, 'di-d'; # digraph push @class, 'di-prop' # unofficial if $diinfo->{$code}->[2] =~ /\bXz\b/; } + elsif (defined $name) { + push @class, 'X'; + } if ($cell =~ /[ -~]/) { push @class, 'di-a'; # ascii @@ -111,8 +103,8 @@ sub glyph_table { defined $name ? qq{ title="$name"} : '', @class ? sprintf(' class="%s"', join ' ', @class) : '', $colspan > 1 && qq{ colspan="$colspan"}, - $cell eq '' ? ' ' : quote($cell), - $code ne '' ? 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) : '', @@ -127,7 +119,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($_); } @@ -135,20 +127,40 @@ sub print_glyph_tables { } } +our $verbose = exists $get{v}; + print_glyph_tables( 'Popular', [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}], [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}], - [qw{. å ä ö ü ß . Å æ ø ű ſ}], + [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ . ◄ ► }], + [qw{. å ä ö ü ß . ā æ ø ű ſ}], [qw{. ¿ ç ñ é ê è}], + [qw{. α β}], [qw{. א}], + + 'Signs', + [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}], + [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}], + [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar + [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac 'Arrows', [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}], [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}], + [qw{. ⬁ ⇧ ⬀ ⬄ . ⇦ - ⇨ ⇳ . ⬃ ⇩ ⬂ -}], + [qw{. ⬉ ⬆ ⬈ ⬌ . ⬅ - ➡ ⬍ . ⬋ ⬇ ⬊ -}], + [qw{. ◩ ⬒ ⬔ . ◧ □ ◨ . ⬕ ⬓ ◪ }], [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }], [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }], +$verbose ? ( + [qw{.    .  -  .    }], + [qw{.    .  -  .    }], +) : (), 'Line drawing', + [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }], + [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }], + [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }], [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}], [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}], [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}], @@ -160,22 +172,13 @@ print_glyph_tables( . ╹ ┃ ╏ ┇ ┋ ╻ ╽ }], [qw{. ╱ ╳ ╲ }], - [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }], - [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }], - [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }], 'Blocks', - [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }], + [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}], [qw{. ░ . ▒ . ▓ }], + [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }], [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }], [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }], - [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}], - - 'Signs', - [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}], - [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}], - [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar - [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac 'IPA', [qw{ @@ -213,14 +216,7 @@ print_glyph_tables( .>Open a ɶ - - ɑ ɒ }], - 'Alphabetics', - [qw{ - .>Latin a ī ı ę ô ɳ ŋ ṡ š đ ð Ʒ - .>Cyrillic а і й э ё н њ ш щ ч ь Я - .>Greek α ί ϊ η ϋ π ψ σ ς θ ξ Ω - .>Hebrew א ײ י ע ו נ ן ס ש ט צ ץ - }], - +$verbose ? ( 'Japanese', [qw{ - A I U E O _ @@ -265,11 +261,12 @@ print_glyph_tables( .>P パ ピ プ ペ ポ .>V ヷ ヸ ヴ ヹ ヺ }], +) : (), ); :>
-
+
ascii digraph @@ -279,16 +276,14 @@ print_glyph_tables(
-