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

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

[Octave-bug-tracker] [bug #33580] dlmread does not interpret CR as a new


From: Jordi Gutiérrez Hermoso
Subject: [Octave-bug-tracker] [bug #33580] dlmread does not interpret CR as a newline
Date: Thu, 16 Jun 2011 18:38:22 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110109 Riverrobin/3.6.13 (like Firefox/3.6.13)

Update of bug #33580 (project octave):

                  Status:                    None => Confirmed              
                 Summary: dlmread does not function as advertised => dlmread
does not interpret CR as a newline

    _______________________________________________________

Follow-up Comment #1:

The advertising (I imagine you mean the docstring) doesn't specify anything
about CR being a newline. The last commonly-used operating system that used CR
as a newline was Mac OS 9. Are you really using this OS?

If you're using a newer POSIX-compatible OS (e.g. Mac OS X), the following
workaround may simplify your life a little to convert CR to LF:

     perl -pi -e 's,r,n,gs' shanghai_node_list2.csv

It may be desirable to intrpret CR as a newline as well. The current
implementation relies on the C++'s standard library default interpretation of
a newline, i.e. looks for the n character. Patching dlmread to interpret CR as
a newline, therefore, isn't entirely a triviality. The patch would optimally
figure out the line ending of the file and use that as a delimiter for the C++
stdlib getline() function.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33580>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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