[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6336] tp open_out run binmode
From: |
Gavin D. Smith |
Subject: |
[6336] tp open_out run binmode |
Date: |
Mon, 15 Jun 2015 11:18:03 +0000 |
Revision: 6336
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6336
Author: gavin
Date: 2015-06-15 11:18:02 +0000 (Mon, 15 Jun 2015)
Log Message:
-----------
tp open_out run binmode
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Common.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-06-14 22:34:33 UTC (rev 6335)
+++ trunk/ChangeLog 2015-06-15 11:18:02 UTC (rev 6336)
@@ -1,3 +1,9 @@
+2015-06-15 Eli Zaretskii <address@hidden>, and
+ Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Common.pm (open_out): Run "binmode" on file handle,
+ to disable conversion of LF to CR LF under MS-Windows.
+
2015-06-14 Karl Berry <address@hidden>
* doc/texinfo.tex (\tcfont, \etcfont): new macros.
Modified: trunk/tp/Texinfo/Common.pm
===================================================================
--- trunk/tp/Texinfo/Common.pm 2015-06-14 22:34:33 UTC (rev 6335)
+++ trunk/tp/Texinfo/Common.pm 2015-06-15 11:18:02 UTC (rev 6336)
@@ -1052,6 +1052,7 @@
}
if ($file eq '-') {
+ binmode(STDOUT);
binmode(STDOUT, ":encoding($encoding)") if ($encoding);
if ($self) {
$self->{'unclosed_files'}->{$file} = \*STDOUT;
@@ -1062,6 +1063,9 @@
if (!open ($filehandle, '>', $file)) {
return undef;
}
+ # We run binmode to turn off outputting LF as CR LF under MS-Windows,
+ # so that Info tag tables will have correct offsets.
+ binmode(STDOUT);
if ($encoding) {
if ($encoding eq 'utf8' or $encoding eq 'utf-8-strict') {
binmode($filehandle, ':utf8');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6336] tp open_out run binmode,
Gavin D. Smith <=