Encoding of MDB Tool
Mdb tool is a strong tool to convert your mdb files (microsoft access database files) to any other format. I had a problems with mdb tool with encoding.
I had a files of “bok” extension, but they are mdb files. those files are uft-8 but the content is windows-1256 and i don’t know why. Exporting the data of those files gives a corrupted data. and I couldn’t convert the output back again
Finally I gathered the scattered information about mdb-tool and I found that I have to set TWO environment variable, the first one is MDB_ICONV
export MDB_ICONV=utf-8
The other variable related on which JET version you are using
mdb-ver file.mdb
If you have JET3 then set the second env variable MDB_JET3_CHARSET
export MDB_JET_CHARSET=utf-8
After setting the env variables, export the data into csv file for example
mdb-export -q ‘”‘ -d ‘,’ -R ‘\n’ > file.csv
or your can get SQL insert statements:
mdb-export -I -q ‘”‘ -d ‘,’ -R ‘\n’ > file.txt

2 Comments
Jump to comment form | comments rss [?] | trackback uri [?]