git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
charset: skip empty petscii rows
[sheet.git]
/
charset.plp
diff --git
a/charset.plp
b/charset.plp
index f9c50d87616715b9d304f6a16e06f4a8a8dc3f89..49f2d504e12dbfe145f44b7246fb0f99919c337d 100644
(file)
--- a/
charset.plp
+++ b/
charset.plp
@@
-14,7
+14,7
@@
Html({
charset codepage unicode ascii utf8 latin glyph character encoding
reference common overview table
'],
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
data => [qw(
charset-encoding.inc.pl
charset-unicode.inc.pl charset-ucplanes.inc.pl charset-utf8.inc.pl
@@
-55,6
+55,7
@@
print join " •\n", (
dos => 'DOS',
mac => 'Apple',
ebcdic => 'EBCDIC',
dos => 'DOS',
mac => 'Apple',
ebcdic => 'EBCDIC',
+ legacy => 'legacy',
$tablist[0] eq 'default' ? () : ('' => 'common'),
],
[
$tablist[0] eq 'default' ? () : ('' => 'common'),
],
[
@@
-131,7
+132,7
@@
sub tabinput {
# extend earlier range
my $skip = int(($row{endpoint} || $row{startpoint}) / $row{cols});
for ($skip + 1 .. (hex($+{start}) / $row{cols}) - 1) {
# extend earlier range
my $skip = int(($row{endpoint} || $row{startpoint}) / $row{cols});
for ($skip + 1 .. (hex($+{start}) / $row{cols}) - 1) {
- $row{skip}->{ $_ * $row{cols}
- $row{startpoint}
}++;
+ $row{skip}->{ $_ * $row{cols} }++;
}
}
else {
}
}
else {
@@
-153,7
+154,7
@@
sub tabinput {
if (defined $row{table} or defined $row{cell}) {
$row{set} //= $input;
}
if (defined $row{table} or defined $row{cell}) {
$row{set} //= $input;
}
- elsif ($row{set} = Encode::resolve_alias($input)) {
+ elsif ($row{set} = Encode::resolve_alias($
charset->{set} // $
input)) {
$row{offset} = delete $row{startpoint};
if ($charset->{varchar}) {
# array of possibly multiple characters per code point
$row{offset} = delete $row{startpoint};
if ($charset->{varchar}) {
# array of possibly multiple characters per code point
@@
-169,6
+170,7
@@
sub tabinput {
$row{endpoint} -= $row{offset};
$visible->{ascii}++; # assume common base
$row{endpoint} -= $row{offset};
$visible->{ascii}++; # assume common base
+ $row{set} = $input if $charset->{set}; # base override
}
else {
Alert("Encoding <q>$input</q> unknown");
}
else {
Alert("Encoding <q>$input</q> unknown");
@@
-301,13
+303,13
@@
for my $row (@request) {
print '<tbody>';
while ($offset <= $row->{endpoint} * $colsize) {
print '<tbody>';
while ($offset <= $row->{endpoint} * $colsize) {
- if ($row->{skip}->{$offset}) {
+ if ($row->{skip}->{$offset
+ $row->{offset}
}) {
$offset += $cols * $colsize;
next;
}
print '<tr><th>';
$offset += $cols * $colsize;
next;
}
print '<tr><th>';
- if (defined $row->{skip}->{$offset}) {
+ if (defined $row->{skip}->{$offset
+ $row->{offset}
}) {
print '⋮';
}
else {
print '⋮';
}
else {
@@
-347,8
+349,8
@@
for my $row (@request) {
$visible->{$glyph}++;
}
$visible->{$glyph}++;
}
- say sprintf $class ? '<td title="%s" class="X %s">%s' : '<td title="%s">',
-
$name, $class, $cell
;
+ printf '<td title="%s"', $name;
+
say $class ? sprintf(' class="X %s">%s', $class, $cell) : '>'
;
}
continue {
$offset += $colsize;
}
continue {
$offset += $colsize;