View Single Post
Old 10-24-2011, 10:18 AM   #419
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 6,966
Karma: 3454321
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 4, iPad 2, Notion Ink Adam Qi, Kindle WiFi, Kindle PW
Quote:
Originally Posted by DiapDealer View Post
I get the exact same results you do. With Calibre 0.8.20 and 0.8.21. The mobiperl tools (or more specifically, the Palm/PDB.pm perl library) expects the Palm Database Name to be terminated with a null character otherwise you get the error you're getting:
Code:
# database names must include a terminating NUL.
die "bogus database name! is this really a PalmOS file?" unless $name =~ /.+\0/;
So maybe there are certain conditions in calibre conversions that result in a Palm Db Name that isn't null terminated when long titles are involved? Somewhere between 52 and 56 characters?
Sound plausible.

And just open file book file in a binary editor and check that there is a 0 in the end. If not then the file is not generated correctly.

Strangely enough the PDB.pm file I include with the mobipoicket distribution does not contain this check. The file on my Dabian machine have this check. It was so long time since I looked into this so I do not remember why I made a special PDB.pm file and why it was used. There was a reason. I think the standard one did not work for certain files. So the idea was that the one include should be used and looking at the code it seem to be used if running the Perl source. Strangely anough it seems not to be used in the packed Windows binary.
tompe is offline   Reply With Quote