mdb-export prints binary for OLE fields.

Bug #390730 reported by Adam Buchbinder
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdbtools (Ubuntu)
Fix Released
Undecided
Jean-Michel Vourgère

Bug Description

Binary package hint: mdbtools

If the database contains OLE fields, mdb-export will output these as raw binary, causing character encoding issues, at the very least, and in my case, unreadable data--the fields are apparently used for replication; this one is "s_Lineage". Due to some unrelated problems with Access, I can't remove the fields, so I'm stuck trying to deal with this input data.

A simple fix is to escape the data in OLE fields as octal bytes, e.g., \130 or whatnot. This requires a rather localized change; a patch to do so (applying to mdb-export.c) is attached. The resultant CSV files now validate with csv-check from the libtext-csv-xs-perl examples.

Unfortunately, I can't attach the database; I've only been able to reproduce the problem with a copy of our production data, which (a) is over 100M, and (b) I'm not privileged to post. But if anyone wants to attach a database with OLE fields that exports mangled data with the unpatched version, please feel free.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: mdbtools 0.5.99.0.6pre1.0.20051109-4
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mdbtools
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

I should note that the current patch mangles the fields, e.g., I get '\147\37777777767\2' where I should probably be getting something else. It doesn't output broken SQL (well, embedded newlines in text fields aren't escaped, but that's a different problem), so it at least works for me; I have no need for these fields to be usable.

Revision history for this message
Jean-Michel Vourgère (jmv-deb) wrote :

Actually this is a bit more complex.
When using csv format, one should *not* escape the binary.
When using insert statement, characters should be escaped in a backend specific way...

Changed in mdbtools (Ubuntu):
assignee: nobody → Jean-Michel Vourgere (jmv-deb)
status: New → Confirmed
Revision history for this message
Jean-Michel Vourgère (jmv-deb) wrote :
Changed in mdbtools (Ubuntu):
status: Confirmed → Fix Committed
Changed in mdbtools (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.