09-26-2010, 04:45 PM | #1 |
Junior Member
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. |
09-26-2010, 04:55 PM | #2 | |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
09-26-2010, 05:58 PM | #3 |
Junior Member
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".
|
09-26-2010, 06:10 PM | #4 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
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.
|
09-26-2010, 06:53 PM | #5 |
Junior Member
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.
|
Advert | |
|
09-26-2010, 07:07 PM | #6 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
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. |
|
09-26-2010, 07:46 PM | #7 |
Junior Member
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! |
09-26-2010, 07:47 PM | #8 |
Junior Member
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.
|
09-27-2010, 04:00 AM | #9 |
Wizard
Posts: 4,552
Karma: 950151
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).
|
09-27-2010, 04:32 AM | #10 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
|
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 |