[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7897] save input_perl_encoding for image
From: |
gavinsmith0123 |
Subject: |
[7897] save input_perl_encoding for image |
Date: |
Sun, 2 Jul 2017 06:13:29 -0400 (EDT) |
Revision: 7897
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7897
Author: gavin
Date: 2017-07-02 06:13:28 -0400 (Sun, 02 Jul 2017)
Log Message:
-----------
save input_perl_encoding for image
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/Plaintext.pm
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/results/converters_tests/at_commands_in_refs_latin1.pl
trunk/tp/t/results/converters_tests/at_commands_in_refs_utf8.pl
trunk/tp/t/results/info_tests/image_text_encoded.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-07-01 22:43:21 UTC (rev 7896)
+++ trunk/ChangeLog 2017-07-02 10:13:28 UTC (rev 7897)
@@ -1,3 +1,10 @@
+2017-07-02 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Parser.pm (_parse_texi) <@image>: Save
+ 'input_perl_encoding' value on @image element.
+ * tp/Texinfo/Convert/Plaintext.pm (_image_text): Use it instead
+ of looking at the current value of INPUT_PERL_ENCODING.
+
2017-07-01 Gavin Smith <address@hidden>
* tp/Texinfo/Parser.pm (_parse_texi_file): Set the parent key on
Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm 2017-07-01 22:43:21 UTC (rev
7896)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm 2017-07-02 10:13:28 UTC (rev
7897)
@@ -1393,9 +1393,9 @@
} else {
my $filehandle = do { local *FH };
if (open ($filehandle, $txt_file)) {
- binmode($filehandle, ":encoding("
- .$self->get_conf('INPUT_PERL_ENCODING').")")
- if (defined($self->get_conf('INPUT_PERL_ENCODING')));
+ my $enc = $root->{'extra'}->{'input_perl_encoding'};
+ binmode($filehandle, ":encoding($enc)")
+ if ($enc);
my $result = '';
my $max_width = 0;
while (<$filehandle>) {
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2017-07-01 22:43:21 UTC (rev 7896)
+++ trunk/tp/Texinfo/Parser.pm 2017-07-02 10:13:28 UTC (rev 7897)
@@ -5068,6 +5068,9 @@
$self->line_error(
$self->__("address@hidden missing filename argument"),
$line_nr);
}
+ $image->{'extra'}->{'input_perl_encoding'}
+ = $self->{'INPUT_PERL_ENCODING'}
+ if defined $self->{'INPUT_PERL_ENCODING'};
} elsif($current->{'parent'}->{'cmdname'} eq 'dotless') {
my $dotless = $current->{'parent'};
if (@{$current->{'contents'}}) {
Modified: trunk/tp/t/results/converters_tests/at_commands_in_refs_latin1.pl
===================================================================
--- trunk/tp/t/results/converters_tests/at_commands_in_refs_latin1.pl
2017-07-01 22:43:21 UTC (rev 7896)
+++ trunk/tp/t/results/converters_tests/at_commands_in_refs_latin1.pl
2017-07-02 10:13:28 UTC (rev 7897)
@@ -3193,7 +3193,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {
'file_name' => '',
@@ -3278,7 +3279,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {},
'parent' => {}
@@ -10258,7 +10260,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {
'file_name' => '',
@@ -10343,7 +10346,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {},
'parent' => {}
@@ -10411,7 +10415,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {
'file_name' => '',
@@ -10496,7 +10501,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {},
'parent' => {}
@@ -15603,7 +15609,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {
'file_name' => '',
@@ -15688,7 +15695,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'iso-8859-15'
},
'line_nr' => {},
'parent' => {}
Modified: trunk/tp/t/results/converters_tests/at_commands_in_refs_utf8.pl
===================================================================
--- trunk/tp/t/results/converters_tests/at_commands_in_refs_utf8.pl
2017-07-01 22:43:21 UTC (rev 7896)
+++ trunk/tp/t/results/converters_tests/at_commands_in_refs_utf8.pl
2017-07-02 10:13:28 UTC (rev 7897)
@@ -3193,7 +3193,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {
'file_name' => '',
@@ -3278,7 +3279,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {},
'parent' => {}
@@ -10258,7 +10260,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {
'file_name' => '',
@@ -10343,7 +10346,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {},
'parent' => {}
@@ -10411,7 +10415,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {
'file_name' => '',
@@ -10496,7 +10501,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {},
'parent' => {}
@@ -15603,7 +15609,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {
'file_name' => '',
@@ -15688,7 +15695,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {},
'parent' => {}
Modified: trunk/tp/t/results/info_tests/image_text_encoded.pl
===================================================================
--- trunk/tp/t/results/info_tests/image_text_encoded.pl 2017-07-01 22:43:21 UTC
(rev 7896)
+++ trunk/tp/t/results/info_tests/image_text_encoded.pl 2017-07-02 10:13:28 UTC
(rev 7897)
@@ -74,7 +74,8 @@
[
{}
]
- ]
+ ],
+ 'input_perl_encoding' => 'utf-8-strict'
},
'line_nr' => {
'file_name' => '',
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7897] save input_perl_encoding for image,
gavinsmith0123 <=