octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59848] dlmread returns wrong values when skip


From: Rik
Subject: [Octave-bug-tracker] [bug #59848] dlmread returns wrong values when skipping non-numerical columns
Date: Wed, 13 Jan 2021 16:16:38 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Update of bug #59848 (project octave):

                Priority:              5 - Normal => 2                      

    _______________________________________________________

Follow-up Comment #9:

I don't want to be pessimistic, but I doubt it is worth fixing this when there
are easy workarounds.  See this Wikipedia article on line terminators
(https://en.wikipedia.org/wiki/Newline).  The last major operating system to
use CR as the line terminator was Mac OS-9 and that was deprecated in 2001. 
It doesn't feel necessary to me to support 20-year old systems.

A one-line conversion, which makes a backup of the original file, is


perl -i.bak -pe 's/\r/\n/g' FILENAME


What system was your student using that put CR as the line terminator?  As I
noted, not modern operating system is using this convention so it is a wonder
that they were able to do this.

More likely is that they were generating the CSV file manually and they
directly put in carriage returns with printf ("\r") as the line endings
instead of using the neutral newline character printf ("\n") which is
translated by the OS to the correct character.  If true, I would suggest that
this is something the programmer got wrong rather than Octave.

We can leave this bug report open in case someone does want to try fixing it.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59848>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]