[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Convert/Info.pm Texinfo...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Convert/Info.pm Texinfo... |
Date: |
Wed, 02 Mar 2011 01:04:17 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/03/02 01:04:16
Modified files:
tp : TODO
tp/Texinfo/Convert: Info.pm Plaintext.pm Unicode.pm
tp/t/results/sectioning: at_commands_in_refs.pl
Log message:
Consider marks to be of zero length.
Set correctly output encoding.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.103&r2=1.104
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Unicode.pm?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl?cvsroot=texinfo&r1=1.33&r2=1.34
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -b -r1.103 -r1.104
--- TODO 28 Feb 2011 22:00:14 -0000 1.103
+++ TODO 2 Mar 2011 01:04:14 -0000 1.104
@@ -82,6 +82,12 @@
Test no empty line before and after a sectioning command. With text, but
also commands.
+Test character lengths and encoding. For instance tests in
+encodings/at_commands_in_refs_utf8.texi
+
+Image on sectioning command line haven't their length ignored correctly.
+Not sure it is a big deal. An example in sectioning/at_commands_in_refs.
+
Following should be an error:
@example
@heading A heading
Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- Texinfo/Convert/Info.pm 27 Feb 2011 21:51:30 -0000 1.42
+++ Texinfo/Convert/Info.pm 2 Mar 2011 01:04:15 -0000 1.43
@@ -134,6 +134,7 @@
$self->{'OUTFILE'}));
return undef;
}
+ $self->{'fh'} = $fh;
}
print STDERR "DOCUMENT\n" if ($self->{'DEBUG'});
my $out_file_nr = 0;
@@ -196,6 +197,7 @@
$self->{'OUTFILE'}.'-'.$out_file_nr));
return undef;
}
+ $self->{'fh'} = $fh;
print $fh $header;
$self->{'count_context'}->[-1]->{'bytes'} += $header_bytes;
push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- Texinfo/Convert/Plaintext.pm 1 Mar 2011 21:44:53 -0000 1.104
+++ Texinfo/Convert/Plaintext.pm 2 Mar 2011 01:04:15 -0000 1.105
@@ -243,7 +243,7 @@
# 'output_encoding' => 'us-ascii',
'documentencoding' => undef,
'encoding' => undef,
- 'output_encoding' => undef,
+# 'output_encoding' => undef,
'OUTFILE' => undef,
'SUBDIR' => undef,
'documentlanguage' => undef,
@@ -288,6 +288,9 @@
if (defined($root->{'extra'})
and defined($root->{'extra'}->{'encoding_alias'})) {
$self->{'encoding'} = $root->{'extra'}->{'encoding_alias'};
+ if (defined($self->{'fh'})) {
+ binmode($self->{'fh'}, ":encoding($self->{'encoding'})");
+ }
} else {
$self->{'encoding'} = undef;
}
@@ -513,6 +516,7 @@
$outfile));
return undef;
}
+ $self->{'fh'} = $fh;
my $result = $self->convert($root);
if (defined($result)) {
print $fh $result;
@@ -680,8 +684,8 @@
my $self = shift;
my $string = shift;
- if ($self->{'output_encoding'} and $self->{'output_encoding'} ne 'us-ascii')
{
- return length(Encode::encode($self->{'output_encoding'}, $string));
+ if ($self->{'encoding'} and $self->{'encoding'} ne 'us-ascii') {
+ return length(Encode::encode($self->{'encoding'}, $string));
} else {
return length($string);
}
Index: Texinfo/Convert/Unicode.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Unicode.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Texinfo/Convert/Unicode.pm 24 Feb 2011 01:24:05 -0000 1.8
+++ Texinfo/Convert/Unicode.pm 2 Mar 2011 01:04:15 -0000 1.9
@@ -590,7 +590,9 @@
foreach my $character(split '', $string) {
if ($character =~ /\p{Unicode::EastAsianWidth::InFullwidth}/) {
$width += 2;
- } else {
+ } elsif ($character =~ /\pM/) {
+ #Â a mark, consider it to be of lenght 0.
+ } elsif ($character =~ /\p{IsPrint}/) {
$width += 1;
}
}
Index: t/results/sectioning/at_commands_in_refs.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- t/results/sectioning/at_commands_in_refs.pl 1 Mar 2011 00:16:35 -0000
1.33
+++ t/results/sectioning/at_commands_in_refs.pl 2 Mar 2011 01:04:15 -0000
1.34
@@ -19679,7 +19679,7 @@
17 [image src="f--ile.png" alt="alt" text="[Image
description\\"\\"\\\\.]"