X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/a226a258f1c08e8dc9b2bb3003955dff3bdf5159..bd1e1ef87447f7922a39414b3deb7d1b305fb3d4:/unicode.plp?ds=sidebyside
diff --git a/unicode.plp b/unicode.plp
index 6e585a4..349ec78 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';
-
-:>
-
-
-
-
@@ -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;
- 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,40 @@ 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{. â â â â . â - â â . â â â -}],
[qw{. â â â â . â - â â . â â â -}],
+ [qw{. ⬠⧠⬠⬠. ⦠- ⨠Ⳡ. ⬠⩠⬠-}],
+ [qw{. ⬠⬠⬠⬠. â¬
- ⡠⬠. ⬠⬠⬠-}],
+ [qw{. ⩠⬠⬠. ⧠⡠⨠. ⬠⬠⪠}],
[qw{. ⤠Ⲡ⥠. â â ⶠ. ⣠⼠⢠}],
[qw{. ⸠Ⳡ⹠. â â â· . ⺠⽠⿠}],
+$verbose ? (
+ [qw{. î© î§ îª . î¥ - î¦ . î« î¨ î¬ }],
+ [qw{. î± î¯ î² . î - î® . î³ î° î´ }],
+) : (),
'Line drawing',
+ [qw{. â ⦠â â . â ⬠⣠â . â â© â - }],
+ [qw{. â ⤠â . â ⪠⡠. â ⧠â }],
+ [qw{. â ⥠â . â ⫠⢠. â ⨠â }],
[qw{. â ⬠â . â ⼠⤠. â â´ â}],
[qw{. â â³ â . ⣠â â« . â â» â}],
[qw{. â ⯠â . â ⿠⥠. â â· â}],
@@ -160,22 +171,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{
@@ -213,14 +215,7 @@ print_glyph_tables(
.>Open a ɶ - - É É
}],
- 'Alphabetics',
- [qw{
- .>Latin a Ä« ı Ä Ã´ ɳ Šṡ Å¡ Ä Ã° Æ·
- .>Cyrillic а Ñ Ð¹ Ñ Ñ Ð½ Ñ Ñ Ñ Ñ Ñ Ð¯
- .>Greek α ί Ï Î· Ï Ï Ï Ï Ï Î¸ ξ Ω
- .>Hebrew × ×² × ×¢ × × × ×¡ ש × ×¦ ×¥
- }],
-
+$verbose ? (
'Japanese',
[qw{
- A I U E O _
@@ -265,11 +260,12 @@ print_glyph_tables(
.>P ã ã ã ã ã
.>V 㷠㸠㴠㹠ãº
}],
+) : (),
);
:>
-
+
ascii
| digraph
@@ -279,16 +275,3 @@ print_glyph_tables(
|
-
-
-