X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/902eb27b5902755d9ab891d85fa5febfd6fd69e9..23eb20afcadb967b11ad957f1fc97999130ba184:/charset.plp diff --git a/charset.plp b/charset.plp index 8e67c67..d8527f0 100644 --- a/charset.plp +++ b/charset.plp @@ -5,7 +5,7 @@ my @tablist = split m{/+}, $Request || 'default'; Html({ title => 'charset cheat sheet', - version => '1.0', + version => '1.2', description => [ "Reference sheet with all glyphs in common character encoding tables,", "and an overview of Unicode ranges and UTF-8 bytes.", @@ -14,7 +14,7 @@ Html({ charset codepage unicode ascii utf8 latin glyph character encoding reference common overview table '], - stylesheet => [qw'light'], + (stylesheet => [qw'light']) x !$mode, data => [qw( charset-encoding.inc.pl charset-unicode.inc.pl charset-ucplanes.inc.pl charset-utf8.inc.pl @@ -28,26 +28,25 @@ use List::Util qw( first pairmap pairfirst pairs );

<: +if ($tablist[0] eq 'unicode') { + say "Detailed allocation of Unicode blocks."; + print "See ", showlink("charsets", '/charset'), " to compare specific encodings"; +} +else { + if ($tablist[0] eq 'default') { - say "Overview of Unicode allocation and common latin code pages."; + say "Overview of Unicode ", showlink("allocation", '/charset/unicode'); + say "and common latin code pages."; say "Compare alternate charsets:"; } else { say "Charset comparison:"; } -sub optionlink { - my ($title, $href, $selected) = @_; - return sprintf( - $selected ? '%s' : '%s', - EscapeHTML($title), $href - ); -} - print join " •\n", ( map { join " ·\n", pairmap { - optionlink($b || ucfirst $a, '/charset'.($a && "/$a?compare"), $a eq $Request); + showlink($b || ucfirst $a, '/charset'.($a && "/$a?compare"), $a eq $Request); } @{$_} } [ @@ -68,6 +67,8 @@ print join " •\n", ( hebrew => 0, ], ); + +} :>.

@@ -346,8 +347,8 @@ for my $row (@request) { $visible->{$glyph}++; } - say sprintf $class ? '%s' : '', - $name, $class, $cell; + print '%s', $class, $cell) : '>'; } continue { $offset += $colsize; @@ -398,7 +399,7 @@ for my $row (@request) { -
unicode 7.0 + unicode 10.0 proposed deprecated unassigned