Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 10-24-2011, 10:58 AM   #421
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,007
Karma: 40853212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by tompe View Post
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.
I'm getting the "bogus database name" error when using the Windows binary (v0.0.43) AND when running from source on my Linux machine.

I can also verify that commenting out the nul term check allows mobi2mobi to work on this particular title. After being converted by calibre.
DiapDealer is offline   Reply With Quote
Old 10-24-2011, 11:12 AM   #422
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: 7,051
Karma: 3993884
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by DiapDealer View Post
I'm getting the "bogus database name" error when using the Windows binary (v0.0.43) AND when running from source on my Linux machine.

I can also verify that commenting out the nul term check allows mobi2mobi to work on this particular title. After being converted by calibre.
Strange. I thought that:
Code:
use FindBin qw($RealBin);
use lib "$RealBin";
Would make sure that the Palm files included in the distribution was used.
tompe is offline   Reply With Quote
Old 10-24-2011, 11:24 AM   #423
adriantc
Member
adriantc began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2011
Device: Amazon Kindle 3 (Wi-Fi)
Quote:
Originally Posted by tompe View Post
Strange. I thought that:
Code:
use FindBin qw($RealBin);
use lib "$RealBin";
Would make sure that the Palm files included in the distribution was used.
So where is the problem... in Mobi2Mobi or Calibre?
adriantc is offline   Reply With Quote
Old 10-24-2011, 11:45 AM   #424
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,007
Karma: 40853212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by adriantc View Post
So where is the problem... in Mobi2Mobi or Calibre?
I'm just not sure. The source (for the most recent version of calibre) that writes the Palmdoc header seems pretty straightforward and would appear to always create a database name that is 32 characters or less and null terminated.
Code:
title = str(self._oeb.metadata.title[0])
title = re.sub('[^-A-Za-z0-9]+', '_', title)[:31]
title = title + ('\0' * (32 - len(title)))
So either:
A) something screwy is happening in calibre that causes the null termination to fail on longer titles.

B) mobi2mobi doesn't think the string is null terminated for some reason.

To be perfectly honest... neither seem very likely to me. I'm a little stymied.
DiapDealer is offline   Reply With Quote
Old 10-24-2011, 11:57 AM   #425
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: 7,051
Karma: 3993884
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by DiapDealer View Post
I'm just not sure. The source (for the most recent version of calibre) that writes the Palmdoc header seems pretty straightforward and would appear to always create a database name that is 32 characters or less and null terminated.
Code:
title = str(self._oeb.metadata.title[0])
title = re.sub('[^-A-Za-z0-9]+', '_', title)[:31]
title = title + ('\0' * (32 - len(title)))
So either:
A) something screwy is happening in calibre that causes the null termination to fail on longer titles.

B) mobi2mobi doesn't think the string is null terminated for some reason.

To be perfectly honest... neither seem very likely to me. I'm a little stymied.
Just look at the example file and see if there is a 0 at position 32 or less.

Maybe the title contains unicode characters?
tompe is offline   Reply With Quote
Old 10-24-2011, 12:28 PM   #426
adriantc
Member
adriantc began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2011
Device: Amazon Kindle 3 (Wi-Fi)
Quote:
Originally Posted by tompe View Post
Just look at the example file and see if there is a 0 at position 32 or less.

Maybe the title contains unicode characters?
No it doesn't... he title is straightforward... The Demon-Haunted World: Science as a Candle in the Dark
adriantc is offline   Reply With Quote
Old 10-24-2011, 01:10 PM   #427
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,007
Karma: 40853212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by tompe View Post
Just look at the example file and see if there is a 0 at position 32 or less.

Maybe the title contains unicode characters?
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 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.

Last edited by DiapDealer; 10-24-2011 at 07:07 PM. Reason: Typo
DiapDealer is offline   Reply With Quote
Old 10-24-2011, 02:00 PM   #428
adriantc
Member
adriantc began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2011
Device: Amazon Kindle 3 (Wi-Fi)
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
Old 10-24-2011, 02:11 PM   #429
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,007
Karma: 40853212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Hey, at least we figured out what was going on.

Gotta respect Kovid for making a change like that—since technically it wasn't even a calibre issue. Luckily, the Db name isn't really that critical to most devices/apps anymore. Like I said, A lot of Amazon's ebooks don't even have one.
DiapDealer is offline   Reply With Quote
Old 10-24-2011, 02:35 PM   #430
adriantc
Member
adriantc began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2011
Device: Amazon Kindle 3 (Wi-Fi)
Quote:
Originally Posted by DiapDealer View Post
Hey, at least we figured out what was going on.

Gotta respect Kovid for making a change like thatŚsince technically it wasn't even a calibre issue. Luckily, the Db name isn't really that critical to most devices/apps anymore. Like I said, A lot of Amazon's ebooks don't even have one.
Yeah... We do have to appreciate him. A small donation is in order. Just last week he fixed another bug I noticed.
adriantc is offline   Reply With Quote
Old 10-24-2011, 06:27 PM   #431
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: 7,051
Karma: 3993884
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
The text at

http://wiki.mobileread.com/wiki/PDB#...atabase_Format

is kind of ambiguous about if it should be always null terminated or not. It says:
Quote:
database name. This name is 0 terminated in the field and will be used as the file name on a computer. For eBooks this usually contains the title and may have the author depending on the length available.
tompe is offline   Reply With Quote
Old 11-04-2011, 11:25 AM   #432
Khan-Dam
Enthusiast
Khan-Dam began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Jul 2011
Location: France
Device: iPad, Kindle 3, Kobo Glo, Kobo Aura
Smile

Hi,

I discover Mobi2Mobi GUI since i had my kindle ( for 1 Week ) i use it to change some tags in my mobi file. but i have some remarks about this tool specialy when i use it with calibre.

I must have my mobi in one folder, calibre explode all in multi-folder.
I must use open button to load mobi info, there are some improvement to work with calibre correctly i think.

So i obtain vb sources and change some little line in source to add the possibility to pass filepath of the book in command line, show the error when mobi2mobi.exe can't open file. the last thing i change is to add special field for handling ECTH 503 ( there is this my kindle use for book name ) and each time i must unroll the combo to shox exth 503 and retype the value, with this modification i can handle simply this field.

now i can directly use from calibre open with menu to open mobi file - with the restrication about 32 char in databasename and 0x00 terminated

I don't know who maintain the source but if you want i can provide the modifycations i work with the version 10. or where must i send them

second thing is it possible to obtain mobi2mobi sources ?

sorry for my english but it's not my birth language

Khan-dam
Khan-Dam is offline   Reply With Quote
Old 11-04-2011, 11:55 AM   #433
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,007
Karma: 40853212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Khan-Dam
second thing is it possible to obtain mobi2mobi sources ?
mobi2mobi is part of the MobiPerl tools. They're just Perl scripts/libraries—some of which have been compiled for Windows so users don't have to install Perl and track down all the dependencies themselves.

You can download the latest source for all of the MobiPerl command-line tools from here: https://dev.mobileread.com/dist/tompe/mobiperl/.
DiapDealer is offline   Reply With Quote
Old 11-19-2011, 04:53 AM   #434
Bismar
Connoisseur
Bismar has learned how to read e-booksBismar has learned how to read e-booksBismar has learned how to read e-booksBismar has learned how to read e-booksBismar has learned how to read e-booksBismar has learned how to read e-booksBismar has learned how to read e-booksBismar has learned how to read e-books
 
Posts: 76
Karma: 928
Join Date: Jul 2008
Location: Down Under
Device: Kobo eReader
Hi,

I'm having issue with the mobi2mobi [filename], particulary in relation to its output being a binary or text file.

Using grep on mobi2mobi [filename], i get at times,

Author is Binary file (standard input) matches, and Title is e (standard input) matches

where the bolded parts is the method returns. Conversion of files was done with the same calibre settings

Edi: for some reason, the carriage return doesn't exist after the author line for some files :/

Last edited by Bismar; 11-19-2011 at 05:48 AM.
Bismar is offline   Reply With Quote
Old 01-13-2012, 08:02 PM   #435
Peter 1977
Junior Member
Peter 1977 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2012
Device: Kindle Touch
Dictionary Support

It would be nice to see a dictionary option added to this program as with the kindle touch there is less flexibility over selecting the dictionary and publishers are putting them under the wrong language. In the past with other kindle this did not matter. I have one here that i had to unpack, adjust and then it wouldnt repack due to utf-8 errors, its much easier to go in directly and adjust it.

It would also be nicer to see more lanagauge in the language list as this list is more important now too, I see spanish wasnt listed and had to set it as neutal and hope it used the correct dictionary. In addition to adding spanish maybe you could add a manual entry and provide a list of codes etc for this. I see there have been no updates for a long time, has a new program superseded this?
Peter 1977 is offline   Reply With Quote
Reply

Tags
mobi2mobi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobiperl Mobiperl - Perl tools for handling MobiPocket files tompe Kindle Formats 871 05-30-2014 02:59 PM
Problem updating metadata (using mobi2mobi command line and gui) whitearrow Kindle Formats 3 12-05-2009 07:07 PM
Mobi2mobi GUI has died again/New version? AlexBell Kindle Formats 8 12-10-2008 08:13 PM
Mobi2Mobi Mobi2Mobi GUI Cover Art Help? huskies4all Kindle Formats 7 09-04-2008 11:31 AM
I seem to have killed Mobi2Mobi gui AlexBell Kindle Formats 8 09-02-2008 01:54 AM


All times are GMT -4. The time now is 01:33 AM.


MobileRead.com is a privately owned, operated and funded community.