06-08-2009, 05:32 PM | #766 |
Evangelist
Posts: 488
Karma: 258
Join Date: Mar 2009
Device: kindle
|
Still quite a few problems it seems.
|
06-09-2009, 05:19 AM | #767 | |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
Code:
href="book.html%23toc" |
|
Advert | |
|
06-09-2009, 05:26 AM | #768 | |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
The opf file in Test.zip did not seem to have this sequence. Is this correct? Was that not generated from Mobi Creator? |
|
06-09-2009, 05:36 AM | #769 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
Would it be possible to change your code to recognise either "#" or "%23"? It's just that Mobi Creator provides an excellent interface for creating and viewing an OPF file, so even if I use your tool for building the book I'd still like to be able to use Mobi Creator for editing the OPF file. Last edited by HarryT; 06-09-2009 at 05:52 AM. |
|
06-09-2009, 05:37 AM | #770 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
Advert | |
|
06-09-2009, 06:03 AM | #771 | |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
I removed the BOM mark (which is optionally but allowed in UTF-8) but I have some other problem getting it to work at all. I teally hate UTF-8... I have not implemented UTF-8 characters correctly in the body of the book so if you use UTF.8 there you should probably use a calibre command line tool instead. If you do not use any multi byte characters then opf2mobi should work (better after I fix the current bugs). |
|
06-09-2009, 06:16 AM | #772 | ||
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Yes. When you type a "#" into a URL in Mobi Creator's OPF editor, it writes it as "%23" (ie 23 in hex - the ASCII code of the # character) in the output file.
Quote:
Quote:
|
||
06-09-2009, 07:39 AM | #773 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
In Perl, there is a function that will take an already encoded URL and decode it back to simple ASCII. Please refer to uri_unescape() which converts a URL encoded string to its normal representation. Then just post-process any URL link that contains a % using uni_unescape, if you would rather not deal with this encoding. |
|
06-09-2009, 07:51 AM | #774 | |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
And the wikipedia page says "URI producers are discouraged from percent-encoding unreserved characters." and in this context # is an unreserved character. But i will fix the program to handle this. Last edited by tompe; 06-11-2009 at 10:05 AM. |
|
06-09-2009, 08:14 AM | #775 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
I guess, Mobipocket Creator adheres to a more strict handling of said characters. You know what they say, Tommy, "If you can't beat them, join them". |
|
06-11-2009, 06:14 AM | #776 |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
It seems that XML::Parser::Lite is not working properly in Perl 5.10.0 (which is my new default Perl). That means that parsing of opf files will fail. Hopefully only opf2mobi is affected. When I figure out a good solution to this problem I will release a new version.
|
06-11-2009, 08:01 AM | #777 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Thanks, Tommy. Look forward to it. The image quality with your tool, which has the option of not rescaling images, is dramatically better than that of Mobi Creator, which insists on doing so. In the mean time, I'll manually edit my OPF files and replace "%23" with "#".
Last edited by HarryT; 06-11-2009 at 08:03 AM. |
06-11-2009, 09:17 AM | #778 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
|
|
06-11-2009, 09:54 AM | #779 | |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
06-11-2009, 10:03 AM | #780 | |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
Tags |
mobi2mobi, mobils |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools | Jad | Kindle Formats | 476 | 03-15-2015 05:51 PM |
Tools for Editing Kindle .mobi Files? | GJN | Kindle Formats | 33 | 12-26-2013 02:05 PM |
Handy Perl Script to convert HTML0 files to smartquotes | maggotb0y | Sony Reader | 0 | 04-12-2007 11:49 AM |
PRS-500 Perl tools to generate Reader content | TadW | Sony Reader Dev Corner | 0 | 01-08-2007 05:55 AM |
gmail copy (gmcp) - Perl script to copy files to/from Gmail | Colin Dunstan | Lounge | 0 | 09-04-2004 01:24 PM |