.
<:
my $diinfo = do 'digraphs.inc.pl';
my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
- keys %$diinfo;
-
-sub quote {
- local $_ = shift;
- s/"/"/g;
- s/</g;
- s/>/>/g;
- return $_;
-}
+ sort { length $a <=> length $b } keys %$diinfo;
sub glyph_table {
my ($digraphs) = @_;
@@ -123,8 +104,8 @@ sub glyph_table {
defined $name ? qq{ title="$name"} : '',
@class ? sprintf(' class="%s"', join ' ', @class) : '',
$colspan > 1 && qq{ colspan="$colspan"},
- $cell eq '' ? ' ' : quote($cell),
- defined $code ? sprintf('
', quote($code))
+ $cell eq '' ? ' ' : EscapeHTML($cell),
+ defined $code ? sprintf('
', EscapeHTML($code))
: length($cell) == 1 && $cell !~ /[a-z]/
? sprintf('
', 'value', ord $cell)
: '',
@@ -139,7 +120,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($_);
}
@@ -147,13 +128,22 @@ 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{. â â â â . â - â â . â â â -}],
@@ -163,10 +153,15 @@ print_glyph_tables(
[qw{. ⩠⬠⬠. ⧠⡠⨠. ⬠⬠⪠}],
[qw{. ⤠Ⲡ⥠. â â ⶠ. ⣠⼠⢠}],
[qw{. ⸠Ⳡ⹠. â â â· . ⺠⽠⿠}],
+$verbose ? (
[qw{. î© î§ îª . î¥ - î¦ . î« î¨ î¬ }],
[qw{. î± î¯ î² . î - î® . î³ î° î´ }],
+) : (),
'Line drawing',
+ [qw{. â ⦠â â . â ⬠⣠â . â â© â - }],
+ [qw{. â ⤠â . â ⪠⡠. â ⧠â }],
+ [qw{. â ⥠â . â ⫠⢠. â ⨠â }],
[qw{. â ⬠â . â ⼠⤠. â â´ â}],
[qw{. â â³ â . ⣠â â« . â â» â}],
[qw{. â ⯠â . â ⿠⥠. â â· â}],
@@ -178,22 +173,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{
@@ -231,14 +217,7 @@ print_glyph_tables(
.>Open a ɶ - - É É
}],
- 'Alphabetics',
- [qw{
- .>Latin a Ä« ı Ä Ã´ ɳ Šṡ Å¡ Ä Ã° Æ·
- .>Cyrillic а Ñ Ð¹ Ñ Ñ Ð½ Ñ Ñ Ñ Ñ Ñ Ð¯
- .>Greek α ί Ï Î· Ï Ï Ï Ï Ï Î¸ ξ Ω
- .>Hebrew × ×² × ×¢ × × × ×¡ ש × ×¦ ×¥
- }],
-
+$verbose ? (
'Japanese',
[qw{
- A I U E O _
@@ -283,6 +262,7 @@ print_glyph_tables(
.>P ã ã ã ã ã
.>V 㷠㸠㴠㹠ãº
}],
+) : (),
);
:>
@@ -298,11 +278,13 @@ print_glyph_tables(