View Single Post
Old 10-24-2011, 02:00 PM   #428
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Quote:
Originally Posted by DiapDealer View Post
No unicode on my end. I just manually typed the title in question to be sure (in case copy paste was doing something weird).

With these really long titles, calibre appears to be filling the entire database name string with 32 characters from the title. The NUL doesn't occur until position 33:

Code:
The_Demon-Haunted_World__Science\x00
That's two underscores between 'World' and 'Science'. With shorter names, the NUL appears at position 32 or less.

It definitely seems like a calibre issue to me... IF it can be verified that a NUL is definitely supposed to be in the 32nd position (or less) of a valid Palmdoc header.

EDIT: Many Kindle books don't no longer have a Palm DB Name, so I can't compare with one of theirs. The only Kindle book I have with a title longer than 32 characters doesn't have a Database name.
Could you please tell me with what software do you read them?

EDIT: Just got a reply from Kovid Goyal:

Quote:
There is no requirement that it be terminated by a NULL. That field is
reserved at 32 characters. If the title is shorter than 32 characters, it is
padded by nulls. If it is 32 chars or more, it is trucated to 32 chars, in
which case it is not NULL terminated.



EDIT: And another reply from Kovid Goyal:

Quote:
However, in the interests of not causing unneccessary breakage, I'll change
calibre to limit the title to 31 chars so that the 32nd will always be zero
terminated.


He said the fix will be implemented in Friday's release.

Last edited by adriantc; 10-24-2011 at 02:04 PM.
adriantc is offline   Reply With Quote