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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 03-31-2008, 07:58 PM   #1
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
what the ’ ??? (mobi conversion woes)

something very strange...

i tried to convert this book to imp, via html, using Nick's conversion tool (version 9.1).

but i got some very strange text as a result...

€™ instead of curly apostrophe, €œ for a double curly left quotation mark, and €� for a double curly right quotation mark...

in the html source, the codes are respectively :
€™ & acirc ; & #128 ; & #153 ; (i added the spaces)
€œ & acirc ; & #128 ; & #156 ;
€� & acirc ; & #128 ; & #157 ;

in the mobi version, the characters display correctly (apostrophe, open quotation mark, close quotation mark).

anybody know why this would happen ? there must be something strange in the mobi code, but i've never seen this result before... and is there any easy way to fix it (besides search and replace, i mean, because for the moment i have identified 3 charactes, but maybe there are a lot more in the rest of the book...) ?

[EDIT yes there are more, a LOT more. it looks like every single special punctuation mark is incorrectly coded. i hope somebody knows an easy way to fix this... or this conversion is going to be a lot more work than i expected...]

Last edited by zelda_pinwheel; 03-31-2008 at 08:00 PM. Reason: read a little further
zelda_pinwheel is offline   Reply With Quote
Old 03-31-2008, 08:28 PM   #2
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,141
Karma: 4315826
Join Date: Oct 2007
Location: Linkpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
I would guess that UTF-8 is used in the MobiPocket file. Try mobi2html from MobiPerl and see if the resulting html file displays correctly in a browser. If that works then it must be the translation to imp that is wrong (and not my problem )
tompe is offline   Reply With Quote
Old 03-31-2008, 08:32 PM   #3
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
i will try mobi2html if you want (if i can figure it out...) but i think the problem is BEFORE the conversion to imp, because the html file which is left behind (it's the source for the imp file) contains these errors.

so, either the problem is in the original mobi code (seems likely), or in the conversion from mobi to html (never had this problem before).

[EDIT : i was looking at the html in a browser already. i have attached the page for you.]
Attached Files
File Type: rar html.rar (54.1 KB, 187 views)

Last edited by zelda_pinwheel; 03-31-2008 at 08:34 PM.
zelda_pinwheel is offline   Reply With Quote
Old 03-31-2008, 08:56 PM   #4
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,141
Karma: 4315826
Join Date: Oct 2007
Location: Linkpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by zelda_pinwheel View Post
i will try mobi2html if you want (if i can figure it out...) but i think the problem is BEFORE the conversion to imp, because the html file which is left behind (it's the source for the imp file) contains these errors.

so, either the problem is in the original mobi code (seems likely), or in the conversion from mobi to html (never had this problem before).

[EDIT : i was looking at the html in a browser already. i have attached the page for you.]
I looked at the HTML file but hard to tell without looking at the MobiPocket file. If you give me the file I will test mobi2html and fix any possible problems with mobi2html (give me a link or email to tpe@ida.liu.se). But since it is 2 o'clock in the night here I might not do it until tomorrow...
tompe is offline   Reply With Quote
Old 03-31-2008, 09:04 PM   #5
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
heh, right, we are in the same time zone...

well, the mobipocket file is here, if you want to look at it tomorrow.

in the meantime, good night !
zelda_pinwheel is offline   Reply With Quote
Old 03-31-2008, 09:19 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,474
Karma: 19300555
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2), Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
The problem is with mobi2imp. The HTML direct from mobi2html has the quotes just fine. I tried it with 9.2 and it had the same problem you did describe.
JSWolf is offline   Reply With Quote
Old 03-31-2008, 09:23 PM   #7
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,141
Karma: 4315826
Join Date: Oct 2007
Location: Linkpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by zelda_pinwheel View Post
heh, right, we are in the same time zone...

well, the mobipocket file is here, if you want to look at it tomorrow.

in the meantime, good night !
Oh, not only me having strange times...

mobi2html did work properly. It said:
Quote:
Adding name attributes
UTF-8 detected: convert before TreBuilder parse
This is a recent fix so it might be something that Nick have not yet merged into his program.
tompe is offline   Reply With Quote
Old 03-31-2008, 09:47 PM   #8
slayda
Retired & reading more!
slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.
 
slayda's Avatar
 
Posts: 2,743
Karma: 884247
Join Date: Sep 2006
Location: North Alabama, USA
Device: Kindle 1, iPad 4, iPhone 5
Quote:
Originally Posted by zelda_pinwheel View Post
heh, right, we are in the same time zone...

well, the mobipocket file is here, if you want to look at it tomorrow.

in the meantime, good night !
Zelda,
mobi2html yields the same erroneous HTML markings. Book Designer will not "unpack" the .prc file. ABC Palm Converter just yields total garbage.

Sorry. Not a lot of help. Tompe seems to have answered. Maybe I need to get an updated version of Mobiperl.

Last edited by slayda; 03-31-2008 at 09:50 PM.
slayda is offline   Reply With Quote
Old 03-31-2008, 10:05 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,474
Karma: 19300555
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2), Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
Quote:
Originally Posted by slayda View Post
Zelda,
mobi2html yields the same erroneous HTML markings. Book Designer will not "unpack" the .prc file. ABC Palm Converter just yields total garbage.

Sorry. Not a lot of help. Tompe seems to have answered. Maybe I need to get an updated version of Mobiperl.
0.0.37 expands the PRC correctly so this error is not the fault of mobi2html. The fault lies in mobi2imp not handling UTF-8 correctly.
JSWolf is offline   Reply With Quote
Old 03-31-2008, 10:37 PM   #10
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by tompe View Post
Oh, not only me having strange times...

mobi2html did work properly. It said:


This is a recent fix so it might be something that Nick have not yet merged into his program.
Yup! Missed this, even though I recently went looking for improvements you have made to the mobiperl code. I found 'longtitle' (yeah!), but saw the test UTF-8 that was commented out and I 'blanked-out'; didn't even see your improvements!

I responded here with the exploration of this issue and that to fix the above strange behaviour, I best be getting the UTF-8 improvements implemented in Mobi2IMP!
nrapallo is offline   Reply With Quote
Old 04-01-2008, 08:42 AM   #11
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
amazing, i go to sleep, and when i wake up everything is fixed and the problem explained !!

brilliant !!

thanks everybody for your help ! i'm glad that the problem was so easily fixed, and i'm particularly glad there was an explanation for it so i understand (i hate those mysterious bugs that make no sense and you can't figure out where they come from, and even when you fix them you don't know why or how...).

have a drink on me, just tell the barman to put it on my tab
zelda_pinwheel is offline   Reply With Quote
Old 04-02-2008, 01:22 AM   #12
jgray
Fanatic
jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.jgray ought to be getting tired of karma fortunes by now.
 
Posts: 512
Karma: 1018067
Join Date: Mar 2008
Device: Galaxy Tab 10.1 & Note II
This issue of quotes, mdashes and such turning into strange characters is why I use the numeric representations in my HTML markup. For example, for a left-double-curly-quote, & # 8220 ; and & # 8221 ; for the right. This is the only way to guarantee that non-ASCII characters will display properly on different systems.

This is especially true with XHTML, as the only such characters defined by name are & lt ;, & gt ; & amp ; (I think there are a few more, I just don't remember them right now). Not even the & nbsp ; is defined for XHTML.

Note that I had to insert spaces on each of those tags. The BBS software shows the character and not the tag that I entered, even if I wrap them in CODE tags.
jgray is offline   Reply With Quote
Old 04-02-2008, 02:09 AM   #13
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,778
Karma: 5072196
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by jgray View Post
This issue of quotes, mdashes and such turning into strange characters is why I use the numeric representations in my HTML markup. For example, for a left-double-curly-quote, & # 8220 ; and & # 8221 ; for the right. This is the only way to guarantee that non-ASCII characters will display properly on different systems.

This is especially true with XHTML, as the only such characters defined by name are & lt ;, & gt ; & amp ; (I think there are a few more, I just don't remember them right now). Not even the & nbsp ; is defined for XHTML.

Note that I had to insert spaces on each of those tags. The BBS software shows the character and not the tag that I entered, even if I wrap them in CODE tags.
The problem was the code was not in word or character coding, they were raw UTM-8. To understand this take the number 8220 from your example and convert it to binary values. In hexadecimal this would be 201C or 0010000000011100 and probably gets byte swapped. This attempts to get converted into 3 very different characters as shown in the problem. The original source possbile or even probably used characters like you do that was fine but it was compiled into Mobi internal format and then disassembled back into html and then converted to imp. The problem has been fixed by recognizing the UTM-8 character set.

Dale
DaleDe is offline   Reply With Quote
Old 04-02-2008, 02:19 AM   #14
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by jgray View Post
The BBS software shows the character and not the tag that I entered, even if I wrap them in CODE tags.
BBS - You're dating yourself with this acronym (and so am I).

Ever use 300 baud (I did)?
nrapallo is offline   Reply With Quote
Old 04-02-2008, 03:27 AM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,433
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by jgray View Post
This issue of quotes, mdashes and such turning into strange characters is why I use the numeric representations in my HTML markup. For example, for a left-double-curly-quote, & # 8220 ; and & # 8221 ; for the right. This is the only way to guarantee that non-ASCII characters will display properly on different systems.

This is especially true with XHTML, as the only such characters defined by name are & lt ;, & gt ; & amp ; (I think there are a few more, I just don't remember them right now). Not even the & nbsp ; is defined for XHTML.

Note that I had to insert spaces on each of those tags. The BBS software shows the character and not the tag that I entered, even if I wrap them in CODE tags.
Actually using numeric entities doesn't guarantee anything. After all you have to adopt some convention for how to decode the numbers into characters. I've seen HTML files that use the convention that the character encoding for the numeric entities is the same as that declared in the meta charset tag.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion error [PDF >> MOBI] OMEN Calibre 3 09-27-2010 01:02 PM
PDF to Mobi Conversion rayh Calibre 2 09-24-2010 03:33 AM
Epub to Mobi conversion MichaelGray Calibre 2 08-12-2010 02:08 PM
conversion to Mobi - Colors lost ichbindasauge Calibre 2 11-06-2009 12:20 PM
Conversion from Mobi to LRF error jessie102 Calibre 2 08-16-2008 01:00 PM


All times are GMT -4. The time now is 06:25 AM.


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