[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58813] csvread fails to handle 1st cell of CS
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #58813] csvread fails to handle 1st cell of CSV as exported by MS Excel as 'utf-8 CSV' due to byte order mark |
Date: |
Thu, 23 Jul 2020 17:47:10 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?58813>
Summary: csvread fails to handle 1st cell of CSV as exported
by MS Excel as 'utf-8 CSV' due to byte order mark
Project: GNU Octave
Submitted by: None
Submitted on: Thu 23 Jul 2020 09:47:08 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Adrian Barnes
Originator Email: anthony_325@tpg.com.au
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Details:
Greetings, I have noticed that csvread incorrectly returns the first cell as
‘0’, when the csv file was saved from MS Excel as ‘UTF-8 csv’, but
works okay when the export type is ‘CSV’. So I suspect something is going
wrong with how csvread works with the ‘byte order mark’ that MS Excel is
now using for this export type. While I am not implying csvread contains a bug
(it is probably meant to work only with ascii csv), it may be appropriate to
add a caveat to the documentation, i.e. csvread’s function reference.
To replicate using GNU Octave 5.2 for linux or for windows (I have tried
both), and Excel 365, create a csv file csvu.csv such as [1 2 3; 4 5 6] and
save as utf8 csv, and the same numbers saved as plain (ascii) csva.csv. In
Octave, use csvread on both files and observe the first value is 0 from
csvu.csv and 1 from csva.csv.
I originally raised this on the GNU/Octave discourse page:
https://octave.discourse.group/t/csvread-1st-cell-incorrect-with-utf-8-csv-files-from-ms-excel/99/2
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 23 Jul 2020 09:47:08 PM UTC Name: csvu.csv Size: 24B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=49537>
-------------------------------------------------------
Date: Thu 23 Jul 2020 09:47:08 PM UTC Name: csva.csv Size: 21B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=49538>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58813>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58813] csvread fails to handle 1st cell of CSV as exported by MS Excel as 'utf-8 CSV' due to byte order mark,
anonymous <=