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="/base.css"><:
20 my %styles = map {$_ => $_} qw(dark circus mono red terse);
21 our $style = exists $get{style} && $styles{$get{style}} || 'light';
22 printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
23 $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
29 <h1>Common uncommon Unicode</h1>
31 <p>i^k in <a href="/">Vim</a>.
32 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
37 my $diinfo = do 'digraphs.inc.pl';
38 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
55 while ($digraphs->[0] !~ /^\./) {
56 my $cell = shift @$digraphs or last;
57 push @colheads, sprintf(
59 $cell =~ s/^-// ? 'td' : 'th',
60 $cell =~ s/:(.*)// ? qq{ title="$1"} : '',
61 $cell eq '_' ? ' ' : $cell
64 push @rows, sprintf '<thead><tr>%s<tbody>', join '', @colheads if @colheads;
67 for my $cell (@$digraphs) {
68 if ($cell =~ s/^\.//) {
69 # dot indicates start of a new row
71 if ($cell =~ s/^>//) {
72 # header cell text follows
73 $cell =~ s/_/ /g; # underscores may be used instead of whitespace (for qw//ability)
74 $rows[-1] .= '<th>'.($cell || ' ');
78 elsif ($cell eq '>') {
79 # merge this cell to the next column
86 # determine display class
91 elsif ($cell eq '=') {
92 push @class, 'di-invalid';
96 if ($cell =~ s/^-//) {
97 push @class, 'di-rare'; # discouraged
100 $code = join '', map { $di{ord $_} || '' } split //, $cell;
101 $name = $diinfo->{$code}->[1];
102 length $code == 2 or undef $code;
105 push @class, 'di-d'; # digraph
106 push @class, 'di-prop' # unofficial
107 if $diinfo->{$code}->[2] =~ /\bXz\b/;
109 elsif (defined $name) {
113 if ($cell =~ /[ -~]/) {
114 push @class, 'di-a'; # ascii
117 push @class, 'di-b'; # basic unicode
122 $rows[-1] .= sprintf('<td%s%s%s>%s%s',
123 defined $name ? qq{ title="$name"} : '',
124 @class ? sprintf(' class="%s"', join ' ', @class) : '',
125 $colspan > 1 && qq{ colspan="$colspan"},
126 $cell eq '' ? ' ' : quote($cell),
127 defined $code ? sprintf(' <small class="digraph">%s</small>', quote($code))
128 : length($cell) == 1 && $cell !~ /[a-z]/
129 ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
136 return sprintf qq{<table class="glyphs dilabel">\n%s</table>\n},
137 join '', map {"<tr>$_\n"} @rows;
140 sub print_glyph_tables {
142 printf "<div><h2>%s</h2>\n\n", shift;
143 while (ref $_[0] and $_ = shift) {
144 print glyph_table($_);
152 [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
153 [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
154 [qw{. å ä ö ü ß . Å æ ø ű ſ}],
158 [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],
159 [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}],
160 [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }],
161 [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }],
164 [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}],
165 [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}],
166 [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}],
167 [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}],
175 [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }],
176 [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }],
177 [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }],
180 [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }],
182 [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }],
183 [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }],
184 [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}],
187 [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}],
188 [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}],
189 [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar
190 [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac
194 - BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar
195 Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal
196 EG:Epiglottal Gl:Glottal
197 .>Plosive p -ȹ > > t ʈ c k q = ʡ ʔ
198 .>Voiced_Plosive b -ȸ > > d ɖ ɟ ɡ ɢ = - =
199 .>Nasal m ɱ > > n ɳ ɲ ŋ ɴ = = =
200 .>Trill ʙ - > > r - - = ʀ = -я =
201 .>Tap/flap - ⱱ > > ɾ ɽ - = ɢ̆ = - =
202 .>Fricative ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
203 .>Voiced_fricative β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
204 .>Lateral_fricative = = > > ɬ - - - - = = =
205 .>Voiced_lateral_fricative = = > > ɮ - - - - = = =
206 .>Approximant - ʋ > > ɹ ɻ j ɰ - - - =
207 .>Lateral_approximant = = > > l ɭ ʎ ʟ - = = =
208 .>Click ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
209 .>Implosive ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
212 co . ɕ . ʑ . ɧ . ɥ . ʍ . w
216 map { substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded" }
217 qw{Front Central Back}
220 .>Near-close ɪ ʏ - - - ʊ
221 .>Close-mid e ø ɘ ɵ ɤ o
223 .>Open-mid ɛ œ ɜ ɞ ʌ ɔ
224 .>Near-open æ - ɐ - - -
230 .>Latin a ī ı ę ô ɳ ŋ ṡ š đ ð Ʒ
231 .>Cyrillic а і й э ё н њ ш щ ч ь Я
232 .>Greek α ί ϊ η ϋ π ψ σ ς θ ξ Ω
233 .>Hebrew א ײ י ע ו נ ן ס ש ט צ ץ
285 <table class="glyphs"><tr>
286 <td class="X di-a">ascii
287 <td class="X di-d">digraph
288 <td class="X di-prop">proposed
289 <td class="X di-b">other unicode
290 <td class="X di-rare">discouraged
295 <a href="/" rel="home">sheet.shiar.nl</a>/unicode
296 <a href="git://git.shiar.nl/sheet" rel="vcs-git" title="Git repository"><:= $VERSION :></a>
297 created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
298 <a title="Licensed under the GNU Affero General Public License, version 3" rel="copyright"
299 href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a>