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->{$_} }
49 while ($digraphs->[0] !~ /^\./) {
50 my $cell = shift @$digraphs or last;
51 push @colheads, sprintf(
53 $cell =~ s/^-// ? 'td' : 'th',
54 $cell =~ s/:(.*)// ? qq{ title="$1"} : '',
55 $cell eq '_' ? ' ' : $cell
58 push @rows, sprintf '<thead><tr>%s<tbody>', join '', @colheads if @colheads;
61 for my $cell (@$digraphs) {
63 if ($cell =~ s/^\.//) {
64 # dot indicates start of a new row
66 if ($cell =~ s/^>//) {
67 # header cell text follows
68 $cell =~ s/_/ /g; # underscores may be used instead of whitespace (for qw//ability)
69 $rows[-1] .= '<th>'.($cell || ' ');
73 elsif ($cell eq '>') {
74 # merge this cell to the next column
79 my $code = join '', map { $di{ord $_} || '' } split //, $cell;
80 my $name = $diinfo->{$code}->[1];
82 # determine display class
83 if ($cell =~ s/^-//) {
86 elsif ($cell eq '=') {
90 elsif ($cell =~ /[ -~]/) {
96 elsif ($diinfo->{$code}->[2] =~ /\bXz\b/) {
104 $rows[-1] .= sprintf('<td%s%s%s>%s%s',
105 defined $name ? qq{ title="$name"} : '',
106 defined $class ? qq{ class="$class"} : '',
107 $colspan > 1 && qq{ colspan="$colspan"},
108 $cell eq '' ? ' ' : quote($cell),
109 $code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
110 : length($cell) == 1 && $cell !~ /[a-z]/
111 ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
118 return sprintf qq{<table class="glyphs dilabel">\n%s</table>\n},
119 join '', map {"<tr>$_\n"} @rows;
122 sub print_glyph_tables {
124 printf "<div><h2>%s</h2>\n\n", shift;
125 while (ref $_[0] and $_ = shift) {
126 print glyph_table($_);
134 [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}],
135 [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}],
136 [qw{. å ä ö ü ß . Å æ ø ű ſ}],
140 [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],
141 [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}],
142 [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}],
143 [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}],
146 [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}],
147 [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}],
148 [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}],
149 [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}],
157 [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }],
158 [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }],
159 [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }],
162 [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }],
164 [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }],
165 [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }],
166 [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}],
169 [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}],
170 [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}],
171 [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar
172 [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac
176 - BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar
177 Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal
178 EG:Epiglottal Gl:Glottal
179 .>Plosive p p̪ > > t ʈ c k q = ʡ ʔ
180 .>Voiced_Plosive b b̪ > > d ɖ ɟ ɡ ɢ = - =
181 .>Nasal m ɱ > > n ɳ ɲ ŋ ɴ = = =
182 .>Trill ʙ - > > r - - = ʀ = -я =
183 .>Tap/flap - ⱱ > > ɾ ɽ - = ɢ̆ = - =
184 .>Fricative ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
185 .>Voiced_fricative β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
186 .>Lateral_fricative = = > > ɬ - - - - = = =
187 .>Voiced_lateral_fricative = = > > ɮ - - - - = = =
188 .>Approximant - ʋ > > ɹ ɻ j ɰ - - - =
189 .>Lateral_approximant = = > > l ɭ ʎ ʟ - = = =
190 .>Click ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
191 .>Implosive ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
195 map { substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded" }
196 qw{Front Central Back}
199 .>Near-close - ɪ ʏ - ʊ -
200 .>Close-mid e ø ɘ ɵ ɤ o
202 .>Open-mid ɛ œ ɜ ɞ ʌ ɔ
203 .>Near-open æ - ɐ - - -
209 .>Latin a ī ı ę ô ɳ ŋ ṡ š đ ð Ʒ
210 .>Cyrillic а і й э ё н њ ш щ ч ь Я
211 .>Greek α ί ϊ η ϋ π ψ σ ς θ ξ Ω
212 .>Hebrew א ײ י ע ו נ ן ס ש ט צ ץ
264 <a href="http://vi.shiar.net/unicode">vi.<strong>shiar.net</strong>/unicode</a>
265 <a href="git://dev.shiar.net/vi-cheat"><:= "v$VERSION" :></a>
267 <a title="Licensed under the GNU Affero General Public License, version 3"
268 href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a> •
270 use Time::Format qw(time_format);
271 print time_format('yyyy-mm-dd', (stat $ENV{SCRIPT_FILENAME})[9]);