X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/3a44f7513defe91c62161807a1ad9a7646155846..7d7b611b3a95208f208a210e9f4a2ee640ca6197:/unicode.plp diff --git a/unicode.plp b/unicode.plp index da5b6e8..eaa3819 100644 --- a/unicode.plp +++ b/unicode.plp @@ -1,28 +1,22 @@ -<: -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'; - -:> - - - -digraph cheat sheet - - - - - -

Common uncommon Unicode

- -

i^k in Vim. +<(common.inc.plp)><: + +Html({ + title => 'unicode glyph cheat sheet', + version => 'v1.0', + description => [ + "Common Unicode characters with digraph or code point, layed out for quick location.", + "Includes general symbols, arrows, drawing characters, and IPA letters.", + ], + keywords => [qw' + unicode glyph char character reference common ipa symbol sign mark table digraph + '], + stylesheet => [qw'light dark red'], +}); + +:> +

Common Unicode

+ +

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

@@ -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; @@ -88,11 +73,17 @@ sub glyph_table { $cell = ''; } else { + push @class, 'X'; + if ($cell =~ s/^-//) { 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/; @@ -111,8 +102,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 +118,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 +126,50 @@ sub print_glyph_tables { } } +our $verbose = exists $get{v}; + print_glyph_tables( 'Popular', [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}], [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}], - [qw{. å ä ö ü ß . Å æ ø ű ſ}], + [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ }], + [qw{. å ä ö ü ß . ā æ ø ű ſ}], [qw{. ¿ ç ñ é ê è}], + [qw{. α β}], [qw{. א}], + + 'Symbols', + [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ฿ ₫ ₭ ₦ ₱ ₮ ₩ ₪}], + [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}], + [qw{. ☮ ☯ ☻ ♪ ♲ ♿ }], + [qw{. ✂ ✉ ☎ }], [qw{. ⚠ ☡ ☠}], + 'Signs', + [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar + [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac + + 'Key commands', + [qw{. ⇥ ⇤ . ␣ ⌫ }], # common spacing + [qw{. ⎀ ⇱ ⇞ . ⌦ ⇲ ⇟ }], # edit block + [qw{. ⇪ ⇯ ⇭ . ⇧ ⇮ № }], # modifier + [qw{. ⎈ ⌥ ⌘ ⎄ }], [qw{. ↵ ⎋ ⎉ ⎊ }], # command + [qw{. ► ⏩ ⏭ ◼ ⚫ . ◄ ⏪ ⏮ ⏏ -❚❚ }], # player ui 'Arrows', [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}], [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}], + [qw{. ⬁ ⇧ ⬀ ⬄ . ⇦ - ⇨ ⇳ . ⬃ ⇩ ⬂ -}], + [qw{. ⬉ ⬆ ⬈ ⬌ . ⬅ - ➡ ⬍ . ⬋ ⬇ ⬊ -}], + [qw{. ◩ ⬒ ⬔ . ◧ □ ◨ . ⬕ ⬓ ◪ }], [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }], [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }], +$verbose ? ( + [qw{.    .  -  .    }], + [qw{.    .  -  .    }], +) : (), 'Line drawing', + [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }], + [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }], + [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }], [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}], [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}], [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}], @@ -159,23 +180,16 @@ print_glyph_tables( . ╵ │ ╎ ┆ ┊ ╷ ╿ . ╹ ┃ ╏ ┇ ┋ ╻ ╽ }], + [qw{. ╭ ╮ . ╰ ╯ }], [qw{. ╱ ╳ ╲ }], - [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }], - [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }], - [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }], + # ┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃╄╅╆╇╈╉╊ 'Blocks', - [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }], + [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}], [qw{. ░ . ▒ . ▓ }], + [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }], [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }], [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }], - [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}], - - 'Signs', - [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}], - [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}], - [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar - [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac 'IPA', [qw{ @@ -197,7 +211,7 @@ print_glyph_tables( .>Implosive ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = = }], [qw{ - co . ɕ . ʑ . ɧ . ɥ . ʍ . w + - co:coarticulated .>sç ɕ .>zʝ ʑ .>ʃx ɧ .>jʷ ɥ .>hw̥ ʍ .>ɰʷ w }], [( '-', @@ -213,14 +227,7 @@ print_glyph_tables( .>Open a ɶ - - ɑ ɒ }], - 'Alphabetics', - [qw{ - .>Latin a ī ı ę ô ɳ ŋ ṡ š đ ð Ʒ - .>Cyrillic а і й э ё н њ ш щ ч ь Я - .>Greek α ί ϊ η ϋ π ψ σ ς θ ξ Ω - .>Hebrew א ײ י ע ו נ ן ס ש ט צ ץ - }], - +$verbose ? ( 'Japanese', [qw{ - A I U E O _ @@ -265,11 +272,12 @@ print_glyph_tables( .>P パ ピ プ ペ ポ .>V ヷ ヸ ヴ ヹ ヺ }], +) : (), ); :>
-
+
ascii digraph @@ -279,16 +287,3 @@ print_glyph_tables(
- - -