bugGNU Octave - Bugs: bug #50979, csv2cell does not ignore CR on...

 
 

bug #50979: csv2cell does not ignore CR on Linux

Submitted by:  A.R. Burgers <arb>
Submitted on:  Tue 09 May 2017 06:47:05 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Open/Closed: Closed
Release: otherOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 16 May 2017 09:19:44 PM UTC, comment #6:

Thanks for testing, fix pushed here:
http://hg.code.sf.net/p/octave/io/rev/d90c36bbd09f

While in hindsight the original fix for bug #50297 was probably a bit naive, I think this bug here is due to C++ getline() behaving differently between Windows and Linux.

Closing report

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 16 May 2017 09:23:59 AM UTC, comment #5:

yes, the proposed patch fixes the issue for me.

A.R. Burgers <arb>
Mon 15 May 2017 08:05:41 PM UTC, comment #4:

Please try the following patch for csv2cell.cc, or just compile (mkoctfile) the attached csv2cell.cc cf. bug #50297, and report back.

(file #40694, file #40695)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 14 May 2017 08:54:34 PM UTC, comment #3:

OK it turns out to be a linux-only bug (I have no Apple HW to test on) => Confirmed.

I hope I can find time this week, if not it'll be June before I can do something about it. Maybe someone beats me to it.

OS => Linux
Status => confirmed
title adapted

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 14 May 2017 10:27:12 AM UTC, comment #2:

On Windows this seems to work fine for me:

Later today I'll try on one of my Linux boxes if I can reproduce it there.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sat 13 May 2017 11:07:17 AM UTC, comment #1:

Thx for reporting, I'll look into it.

Release => other (it's not core Octave)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 09 May 2017 06:47:05 AM UTC, original submission:

consider this .csv file

the attached script applied on the attached .csv files reports:

In case of a CRLF terminated file, the number in row 2,column2 is interpreted as a string and not converted to a number.

See also https://savannah.gnu.org/bugs/?50297

A.R. Burgers <arb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #40694:  csv2cell.patch added by philipnienhuis (783B - text/x-patch)
file #40695:  csv2cell.cc added by philipnienhuis (15KiB - text/x-c++src)
file #40627:  bug2_CRLF.csv added by arb (23B - application/vnd.ms-excel)
file #40628:  bug.m added by arb (278B - text/plain)
file #40629:  bug2_LF.csv added by arb (21B - application/vnd.ms-excel)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by arb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 16 May 2017 09:19:44 PM UTCphilipnienhuisStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 15 May 2017 08:05:41 PM UTCphilipnienhuisAttached File-=>Added csv2cell.patch, #40694
      Attached File-=>Added csv2cell.cc, #40695
      StatusConfirmed=>Patch Submitted
    Sun 14 May 2017 08:54:34 PM UTCphilipnienhuisStatusNone=>Confirmed
      Operating SystemAny=>GNU/Linux
      Summarycsv2cell does not ignore CR=>csv2cell does not ignore CR on Linux
    Sat 13 May 2017 11:07:17 AM UTCphilipnienhuisAssigned toNone=>philipnienhuis
      Releasedev=>other
    Tue 09 May 2017 06:47:05 AM UTCarbAttached File-=>Added bug2_CRLF.csv, #40627
      Attached File-=>Added bug.m, #40628
      Attached File-=>Added bug2_LF.csv, #40629

    Back to the top


    Powered by Savane 3.1-cleanup1