mdb-export prints binary for OLE fields.
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.
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: mdbtools
Uname: Linux 2.6.28-11-generic i686
Changed in mdbtools (Ubuntu): | |
status: | Fix Committed → Fix Released |
I should note that the current patch mangles the fields, e.g., I get '\147\377777777 67\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.