View Single Post
Old 01-11-2014, 08:00 PM   #11
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,764
Karma: 24088559
Join Date: Dec 2010
Device: Kindle PW2
Since Mobipocket Creator expects unicode files with byte-order-marks (BOM) and your .html source file doesn't have one, it couldn't hurt to add a BOM to your .html source file, in particular, if it contains non-Latin characters. (KindleGen doesn't require a BOM, but handles utf8 files with a BOM fine.)

Resave your .html source file as a utf8 file with a BOM, empty your Temp folder and execute KindleGen using the following command line:
Code:
KindleGen your.opf > error.log
If it crashes again, have a look at error.log, which should help you identify the line that causes problems. If it doesn't, post the log file here.

If none of the above helps, split your source file into several smaller files. The largest file that I ever compiled was an 80MB utf-16LE source file, which compiled fine with both Mobipocket Creator and KindleGen. Try splitting your source file into several 75 MB files and update the <manifest> and <spine> sections of your .opf accordingly.

Also have a look at the output that your Ruby script creates and check for isolated ampersands (&) or angle brackets (<>) that haven't been escaped as entities (&amp; &lt; &gt; etc.) as these are known to cause problems with many HTML parsers.
For example, having a line such as the following will cause problems:

Code:
<idx:orth>Rock Music > Rock & Roll</idx:orth>

Last edited by Doitsu; 01-12-2014 at 03:11 AM.
Doitsu is offline   Reply With Quote