changeset 22005:f078dd2c6f27

fileread: read file in text mode (bug #48326) * fileread.m: Open file with mode "rt" to handle line endings correctly.
author Mike Miller <mtmiller@octave.org>
date Thu, 30 Jun 2016 10:08:48 -0700
parents 78000c426b73
children f1136cf44edc
files scripts/io/fileread.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/io/fileread.m	Thu Jun 30 12:01:02 2016 -0400
+++ b/scripts/io/fileread.m	Thu Jun 30 10:08:48 2016 -0700
@@ -32,7 +32,7 @@
     error ("fileread: FILENAME argument must be a string");
   endif
 
-  fid = fopen (filename, "r");
+  fid = fopen (filename, "rt");
   if (fid < 0)
     error ("fileread: cannot open file");
   endif