Unsupported file format for file "foo.csv"
Scenario, Observed Behavior
-
Starting with a gnumeric spreadsheet, I export to a file "foo.csv" which is two lines long. foo.gnumeric foo.csv
-
The file appears to be a fairly ordinary .csv file, with some UTF8 characters. I observe that ordinary tools such as perl Text::CSV_XS can read the file just fine.
-
However, I am unable to read that file back in to gnumeric. I get a popup that says:
Unsupported file format for file "foo.csv"
This failure is 100% reproducible chez moi. It is observed with a very recent version (from git sources) and also with a multi-year-old version (from the ubuntu "focal" distro).
- If I edit out the unicode, gnumeric can read the file. bar.csv
Desired Behavior It would nice if gnumeric could reliably read ordinary csv files. Especially csv files that gnumeric has written, but not just that. I depend on csv to exchange data to/from other programs (c++, perl, etc., etc.) and to/from other persons in far-away places. AFAICT there is no feasible alternative.
In particular, unicode has been pretty widely deployed for a couple of decades, and should not be a barrier to reading the file. The only things that should matter are things like commas, quotes, and newlines, which are the same whether or not we interpret the unicode as unicode or not. Just to rub salt in the wound, in file foo.csv the unicode is in a column I don't care about.
Circumstances
:; uname -srmo
Linux 5.17.3+ x86_64 GNU/Linux
:; lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:cxx-4.1-amd64:cxx-4.1-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:graphics-4.1-amd64:graphics-4.1-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
:; GG --version
gnumeric version '1.12.53'
datadir := '/usr/src/gnome/install/share/gnumeric/1.12.53'
libdir := '/usr/src/gnome/gnumeric'
:; git log
commit ec3eca7927f09d450f6263f398b09a50b6fe5055