Mork or what?
Posted by Mike Haller
on Tuesday, December 26. 2006
at 00:00
in Java
There is a rather funny database format used in some popular Mozilla applications called Mork. The lexical proximity to the word dork is probably not intended, but who knows.A project has been started which has it's goal to provide a Java implementation which can parse Mork database files. The thingy is called jMork - a Java Mork implementation.
It's in a very early stage but can already be used to read in Thunderbirds address books.
Why i talk about Mork ... i wanted to import some contacts and already integrated a billing software based on paradox. I managed to use an evaluation driver of a Paradox JDBC driver which worked perfectly. I only needed it once, so I guess the evaluation license is ok for such usage.
Now I also want to import my contact from Thunderbird and I wondered whether I could directly use the internal text file format. After some google queries, it became clear that the text format is ... other than expected.
After some reading of the specification of the Mork format at Mozilla's archive site, i began implementing a Mork parser. Hopefully this will be useful to anybody who ever wants to fiddle with such files.
By the way, the format is also used for the history.dat file of Firefox and looks like this:
// <!-- <mdb:mork:z v="1.4"/> -->
< <(a=c)> // (f=iso-8859-1)
(B8=Custom3)(B9=Custom4)(BA=Notes)(BB=LastModifiedDate)(BC=RecordKey)
...
[24(83137)(84138)(^85=)(^86=)(87139)(^88=)(8913A)(8A13A)
(^8B=)(^8C=)(^8D=)(^8E=0)(^8F=0)(^90=)(^91=)(^92=)(^93=)(^94=)(^95=)
(^96=)(^97=)(^98=)(^99=)(^9A=)(^9B=)(^9C=)(^9D=)(^9E=)(^9F=)(^A0=)
...
@$${6D{@
<(157=4597c727)>[9:^80(BB157)]
@$$}6D}@
Some bloggers hate the author of the format for his "genuine" ideas, others are mature enough to not comment on it at all. However, in modern times, XML would have been choosen anyway.
There are also somed bloggers who summarize what the format is:
After a short look at the history.dat file of the Mozilla FireFox browser I was convinced. The person who has thought up the file format is insane, and it would take quite some time to program my own Perl solution.
(Source: http://johnbokma.com/mexit/2004/04/19/mork.html)
And this is probably the most funniest thread about Mork: when the database worms eat into your brain"
