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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-26-2010, 04:45 PM   #1
salasnet
Junior Member
salasnet began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2009
Location: South Florida
Device: Sony PRS-505
Calibre and Smart Quotes

I am completely stumped on how to preserve smart quotes when creating an ePub book in Calibre from a source file. No matter if I use TXT, or HTML, ePub generation in Calibre does not preserve smart quotes and they render as garbage characters in both the built in ePub viewer and my Sony Reader.

Example:
I have a TXT source file which has smart quotes and smart single quotes. This TXT source file was used to generate an LRF ebook with Calibre some time ago. The LRF file has smart quotes which display as intended in my Sony Reader.

If I convert this LRF file to ePub, the smart quotes and single quotes are preserved in the resulting ePub file.

However, if I use my original TXT source file that the LRF was created from to generate the ePub, then all smart quotes are rendered as garbage characters (a black diamond with a question mark in it, I think it is).

I have tried converting my original source file to every encoding possible before generating the ePub, I have created an HTML file from the TXT source file, etc. etc. etc. No combination works.

It is not just smart quotes and single quotes... all non-standard ANSI characters also do not get converted. i.e. letters with accents on them, etc.

I have tried this with a number of my original source files that generated perfect LRF files, and new source files which I am trying to create new books with. New creation of ePub from source files = no smart quotes / Conversion of ePub from existing LRF = no problems

Any suggestions or information would be much appreciated.
salasnet is offline   Reply With Quote
Old 09-26-2010, 04:55 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 25,069
Karma: 34462775
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by salasnet View Post
I am completely stumped on how to preserve smart quotes when creating an ePub book in Calibre from a source file. No matter if I use TXT, or HTML, ePub generation in Calibre does not preserve smart quotes and they render as garbage characters in both the built in ePub viewer and my Sony Reader.

Example:
I have a TXT source file which has smart quotes and smart single quotes. This TXT source file was used to generate an LRF ebook with Calibre some time ago. The LRF file has smart quotes which display as intended in my Sony Reader.

If I convert this LRF file to ePub, the smart quotes and single quotes are preserved in the resulting ePub file.

However, if I use my original TXT source file that the LRF was created from to generate the ePub, then all smart quotes are rendered as garbage characters (a black diamond with a question mark in it, I think it is).

I have tried converting my original source file to every encoding possible before generating the ePub, I have created an HTML file from the TXT source file, etc. etc. etc. No combination works.

It is not just smart quotes and single quotes... all non-standard ANSI characters also do not get converted. i.e. letters with accents on them, etc.

I have tried this with a number of my original source files that generated perfect LRF files, and new source files which I am trying to create new books with. New creation of ePub from source files = no smart quotes / Conversion of ePub from existing LRF = no problems

Any suggestions or information would be much appreciated.
you can try setting a alternate code page, in the input Character encoding box, when you convert. I believe cp1252 is one to try.
theducks is offline   Reply With Quote
Advert
Old 09-26-2010, 05:58 PM   #3
salasnet
Junior Member
salasnet began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2009
Location: South Florida
Device: Sony PRS-505
Setting the input encoding to cp1252 results in Calibre never converting the book. It hangs at 67% during "Creating EPUB Output".
salasnet is offline   Reply With Quote
Old 09-26-2010, 06:10 PM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by salasnet View Post
Setting the input encoding to cp1252 results in Calibre never converting the book. It hangs at 67% during "Creating EPUB Output".
Unless something has been broke it does not typically hang. If the process hasn't stopped with an error then it is still processing the file. I've had the rare file take hours to convert.
DoctorOhh is offline   Reply With Quote
Old 09-26-2010, 06:53 PM   #5
salasnet
Junior Member
salasnet began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2009
Location: South Florida
Device: Sony PRS-505
I've just tested with a number of files, they all exhibit the same behavior. These are not large files, either. I am testing with 200-300K files. Normally, any book I convert is very quick. If I remove the smart quotes from the input TXT file, the conversion to epub is practically instantaneous.
salasnet is offline   Reply With Quote
Advert
Old 09-26-2010, 07:07 PM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by salasnet View Post
I've just tested with a number of files, they all exhibit the same behavior. These are not large files, either. I am testing with 200-300K files. Normally, any book I convert is very quick. If I remove the smart quotes from the input TXT file, the conversion to epub is practically instantaneous.
Interesting, try checking the transliterate Unicode characters to ASCII and the Smarten punctuation options.

If that doesn't work then submit an example file and a detailed report describing the bug on the calibre's bug tracker to have someone look at it.
DoctorOhh is offline   Reply With Quote
Old 09-26-2010, 07:46 PM   #7
salasnet
Junior Member
salasnet began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2009
Location: South Florida
Device: Sony PRS-505
Well, my apologies for having taken up your time with this issue. I must confess I never even saw the "Smarten punctuation" option in the Look & Feel section. It doesn't matter if my source file has smart quotes or not... Calibre will do it for me!

Although my original issue remains (a document with smart punctuation still will not convert), it is made irrelevant by this feature in Calibre.

It is easy enough for me to remove the smart punctuation from my source files and "dumb them down" and allow Calibre to handle the smartening for me, which I just tested on a file and works beautifully.

Many thanks for your help and for saying something that pointed me in the right direction. Your time is much appreciated!
salasnet is offline   Reply With Quote
Old 09-26-2010, 07:47 PM   #8
salasnet
Junior Member
salasnet began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2009
Location: South Florida
Device: Sony PRS-505
Oh, and one more thing... thank you Kovid for such an amazing program. I'm certain that there are thousands upon thousands of lurkers like myself who have been using the program for a few years but do not give you the thanks you deserve.
salasnet is offline   Reply With Quote
Old 09-27-2010, 04:00 AM   #9
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,508
Karma: 950063
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
It might still be worth raising a bug report with attached sample file on the original problem. Calibre should not have been hanging during conversion and given an example of a file that causes the problem means the reason can be investigated (and hopefully fixed).
itimpi is offline   Reply With Quote
Old 09-27-2010, 04:32 AM   #10
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by itimpi View Post
It might still be worth raising a bug report with attached sample file on the original problem. Calibre should not have been hanging during conversion and given an example of a file that causes the problem means the reason can be investigated (and hopefully fixed).
. . .
DoctorOhh 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
Smart Quotes Toxaris ePub 2 05-31-2010 10:32 AM
Smart quotes in XHTML? MaggieScratch ePub 12 03-28-2009 05:53 PM
Removing smart quotes horseyride Workshop 8 03-06-2008 12:08 PM
BASIC program for smart quotes Puffball Workshop 4 01-24-2007 09:43 AM
Smart quotes in RTF? ogghead Sony Reader 8 01-23-2007 06:38 PM


All times are GMT -4. The time now is 12:21 PM.


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