X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/28151a28db84c6d6018232f36c0003ecd562b3f0..9a4d89685edcb4399aa500d38de84b0101ad09b2:/charset.plp
diff --git a/charset.plp b/charset.plp
index 29e7e23..e84ae82 100644
--- a/charset.plp
+++ b/charset.plp
@@ -1,17 +1,20 @@
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
-:>
-
+Html({
+ title => 'charset cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Reference sheet with all glyphs in common character encoding tables,",
+ "and an overview of Unicode ranges and UTF-8 bytes.",
+ ],
+ keywords => [qw'
+ charset codepage unicode ascii utf8 latin glyph character encoding
+ reference common overview table
+ '],
+ stylesheet => [qw'light'],
+});
-
-
-charset cheat sheet
-<:= stylesheet(qw'light') :>
-
-
-
+:>
Character encoding
<:
@@ -94,17 +97,9 @@ for my $cp437 (grep {$request[$_]->{set} eq 'cp437'} 0 .. $#request) {
);
}
-sub quote {
- local $_ = shift;
- s/"/"/g;
- s/</g;
- s/>/>/g;
- return $_;
-}
-
my @nibble = (0..9, 'A'..'F');
for my $row (@request) {
- printf '', !$row->{cell} && ' charmap';
+ printf '', !$row->{cell} && ' charmap';
printf '%s', $row->{set};
print '' x 17;
for my $section (qw{thead}) {
@@ -138,18 +133,18 @@ for my $row (@request) {
}
my ($codepoint, $name, $prop, $script, $string) = @$info;
- $glyph = quote($string || $glyph);
+ $glyph = EscapeHTML($string || $glyph);
my $desc = sprintf 'U+%04X%s', $codepoint, $name && " ($name)";
my @class = ('X', grep {$_} $prop, $script);
$glyph = "$glyph" if $prop eq 'Zs';
printf "\n".'%s',
- join(' ', @class), quote($desc), $glyph;
+ join(' ', @class), EscapeHTML($desc), $glyph;
}
print "\n";
}
- print " |
\n";
+ print "
\n";
}
:>
@@ -196,14 +191,3 @@ for my $row (@request) {
-
-
-