After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644189 - Codepage warning on opening dbf file
Codepage warning on opening dbf file
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export other
1.10.x
Other All
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-03-08 11:50 UTC by dudley
Modified: 2011-03-08 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dudley 2011-03-08 11:50:24 UTC
Attempting to open a dbf file with c. 5 million records stopped after record 65,536. Used File/Open as the import procedure.
Comment 1 Andreas J. Guelzow 2011-03-08 16:37:04 UTC
Can you provide a sample dbf file for testing? 

(65,536 used to be the old fixed row limit. It is likely that the dbf importer was never updated to allow for more rows.)
Comment 2 dudley 2011-03-08 16:51:19 UTC
File too large to upload.

Copy placed on

ftp://ftp.wrcplc.co.uk
user name: stoat-user
password: mustela2006
Comment 3 Andreas J. Guelzow 2011-03-08 17:34:42 UTC
When opening that file we are getting lots of warnings (unrelated to its size) it seems that the file is not quite what we expect as a dbf file.

Note that the code has indeed be updated to allow more rows. We have to dig deeper.
Comment 4 Andreas J. Guelzow 2011-03-08 17:56:23 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

Note that the fix consisted of deleting a single line of code that overwrote a correct initialization.

I am leaving this report open since the file still shows the warning:

** (gnumeric:29482): WARNING **: File has unknown or missing code page information (57)
Comment 5 Morten Welinder 2011-03-08 18:19:25 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 6 dudley 2011-03-08 19:36:25 UTC
(In reply to comment #3)
> When opening that file we are getting lots of warnings (unrelated to its size)
> it seems that the file is not quite what we expect as a dbf file.
> 
> Note that the code has indeed be updated to allow more rows. We have to dig
> deeper.

The file is created by a GIS application from a company called ESRI. It is *supposed* to be a dBase-standard dbf file, but I couldn't tell you if it is dBase II, III, IV or V. Access 2000 opened the file with no complaints, but whether that means anything I wouldn't know!
Comment 7 dudley 2011-03-08 19:37:03 UTC
(In reply to comment #4)
> This problem has been fixed in the development version. The fix will be
> available in the next major software release. Thank you for your bug report.
> 
> Note that the fix consisted of deleting a single line of code that overwrote a
> correct initialization.
> 
> I am leaving this report open since the file still shows the warning:
> 
> ** (gnumeric:29482): WARNING **: File has unknown or missing code page
> information (57)

Thank you!
Comment 8 Andreas J. Guelzow 2011-03-08 21:54:49 UTC
@dudley,

if you can recompile Gnumeric the fix is trivial:

diff --git a/plugins/xbase/boot.c b/plugins/xbase/boot.c
index 4eb474f..484e8c5 100644
--- a/plugins/xbase/boot.c
+++ b/plugins/xbase/boot.c
@@ -162,7 +162,6 @@ xbase_file_open (GOFileOpener const *fo, GOIOContext *io_context,
return;
}
- rows = 0;
wb = wb_view_get_workbook (wb_view);
for (pass = 1; pass <= 2; pass++) {

Then the dbf import should work for you as expected. Of course your performance depends on the underlying hardware.