5 no warnings 'qw'; # that's not a comment, it's a NUMBER SIGN
6 use open IO => ':utf8';
10 $header{content_type} = 'text/html; charset=utf-8';
12 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
13 "http://www.w3.org/TR/html4/loose.dtd">
17 <title>digraph cheat sheet</title>
18 <meta http-equiv="content-type" content="utf-8">
19 <link rel="stylesheet" type="text/css" media="all" href="/digraphs.css">
23 <h1>Common uncommon Unicode</h1>
25 <p>i^k in <a href="/">Vim</a>.
26 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
31 my $diinfo = do 'digraphs.inc.pl';
32 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
44 my ($digraphs, $rowheads, $colheads) = @_;
49 for my $cell (@$digraphs) {
53 $rows[-1] .= '<th>'.(shift @$rowheads || ' ') if $rowheads;
56 elsif ($cell eq '>') {
61 my $code = join '', map { $di{ord $_} || '' } split //, $cell;
62 my $name = $diinfo->{$code}->[1];
64 if ($cell =~ s/^-//) {
67 elsif ($cell eq '=') {
71 elsif ($cell =~ /[ -~]/) {
77 elsif ($diinfo->{$code}->[2] =~ /\bXz\b/) {
84 $rows[-1] .= sprintf('<td%s%s%s>%s%s',
85 defined $name ? qq{ title="$name"} : '',
86 defined $class ? qq{ class="$class"} : '',
87 $colspan > 1 && qq{ colspan="$colspan"},
88 $cell eq '' ? ' ' : quote($cell),
89 $code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
90 : length($cell) == 1 && $cell !~ /[a-z]/
91 ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
99 unshift @rows, sprintf '<thead><tr><td>%s<tbody>', join '',
100 map { sprintf '<th title="%2$s">%s', split(/:/, $_, 2), '', '' }
104 return sprintf qq{<table class="glyphs dilabel">\n%s</table>\n},
105 join '', map {"<tr>$_\n"} @rows;
108 print "<div>\n", "<h2>Popular</h2>\n\n";
109 print glyph_table(@$_) for (
110 [ [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}]],
111 [ [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}]],
112 [ [qw{. å ä ö ü ß . Å æ ø ű ſ}]],
113 [ [qw{. ¿ ç ñ é ê è}]],
117 print "<div>\n", "<h2>Arrows</h2>\n\n";
118 print glyph_table(@$_) for (
119 [ [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}]],
120 [ [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}]],
121 [ [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}]],
122 [ [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}]],
126 print "<div>\n", "<h2>Line drawing</h2>\n\n";
127 print glyph_table(@$_) for (
128 [ [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}]],
129 [ [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}]],
130 [ [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}]],
131 [ [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}]],
139 [ [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }]],
140 [ [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }]],
141 [ [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }]],
145 print "<div>\n", "<h2>Blocks</h2>\n\n";
146 print glyph_table(@$_) for (
147 [ [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }]],
148 [ [qw{. ░ . ▒ . ▓ }]],
149 [ [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }]],
150 [ [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }]],
151 [ [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}]],
155 print "<div>\n", "<h2>Signs</h2>\n\n";
156 print glyph_table(@$_) for (
157 [ [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}]],
158 [ [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}]],
159 [ [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar
160 [ [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac
164 print "<div>\n", "<h2>IPA</h2>\n\n";
165 print glyph_table(@$_) for (
168 . p p̪ > > t ʈ c k q = ʡ ʔ
169 . b b̪ > > d ɖ ɟ ɡ ɢ = - =
170 . m ɱ > > n ɳ ɲ ŋ ɴ = = =
171 . ʙ - > > r - - = ʀ = -я =
172 . - ⱱ > > ɾ ɽ - = ɢ̆ = - =
173 . ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
174 . β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
175 . = = > > ɬ - - - - = = =
176 . = = > > ɮ - - - - = = =
177 . - ʋ > > ɹ ɻ j ɰ - - - =
178 . = = > > l ɭ ʎ ʟ - = = =
179 . ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
180 . ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
191 'Voiced lateral fricative',
193 'Lateral approximant',
198 qw'BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal EG:Epiglottal Gl:Glottal',
211 [qw{Close Near-close Close-mid Mid Open-mid Near-open Open}],
212 [map {substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded"} qw{Front Central Back}]
217 print "<div>\n", "<h2>Alphabetics</h2>\n\n";
219 [ map { ('.', split //, $_->[1]) } @$_ ],
220 [ map { $_->[0] } @$_ ],
222 [Latin => 'aīıęôɳŋṡšđðƷ'],
223 [Cyrillic => 'аійэёнњшщчьЯ'],
224 [Greek => 'αίϊηϋπψσςθξΩ'],
225 [Hebrew => 'אײיעונןסשטצץ'],
229 print "<div>\n", "<h2>Japanese</h2>\n\n";
230 print glyph_table(@$_) for (
244 ['', qw{K S T N H M Y R W}],
271 ['', qw{K S T N H M Y R W}],
292 <a href="http://vi.shiar.net/unicode">vi.<strong>shiar.net</strong>/unicode</a>
293 <a href="git://dev.shiar.net/vi-cheat"><:= "v$VERSION" :></a>
295 <a title="Licensed under the GNU Affero General Public License, version 3"
296 href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a> •
298 use Time::Format qw(time_format);
299 print time_format('yyyy-mm-dd', (stat $ENV{SCRIPT_FILENAME})[9]);