05-04-2009, 04:09 PM | #1 |
Dry fruit
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
|
Trying to convert rtf=>ePub w/ calibre
Trying to convert a .rtf to ePub I get this error message:
---------------------------------------------------------------------- Job: **Convertir le livre: Les Dieux ont soif** **tuple**: ('InvalidRtfException', u"'ascii' codec can't decode byte 0xa7 in position 10: ordinal not in range(128)Invalid RTF: File not ascii encoded.\n") **Traceback**: Traceback (most recent call last): File "parallel.py", line 958, in worker File "parallel.py", line 916, in work File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 167, in any2epub File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 86, in rtf2opf File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\rtf\c onvert_from.py", line 144, in generate_html File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\rtf\c onvert_from.py", line 134, in generate_xml File "calibre\ebooks\rtf2xml\ParseRtf.pyo", line 237, in parse_rtf InvalidRtfException: 'ascii' codec can't decode byte 0xa7 in position 10: ordinal not in range(128)Invalid RTF: File not ascii encoded. **Log**: Converting RTF to XML... line: 14 char: 11 'ascii' codec can't decode byte 0xa7 in position 0: ordinal not in range(128) line: 15 char: 11 'ascii' codec can't decode byte 0xa7 in position 0: ordinal not in range(128) line: 16 char: 11 'ascii' codec can't decode byte 0xa7 in position 0: ordinal not in range(128) line: 17 char: 11 'ascii' codec can't decode byte 0xa7 in position 0: ordinal not in range(128) line: 18 char: 11 'ascii' codec can't decode byte 0xa7 in position 0: ordinal not in range(128) line: 19 char: 11 'ascii' codec can't decode byte 0xa7 in position 0: ordinal not in range(128) File "c:\docume~1\yvesgr~1\locals~1\temp\calibre_0.5.10 _97hnv4.rtf" does not appear to be RTF. ('InvalidRtfException', u"'ascii' codec can't decode byte 0xa7 in position 10: ordinal not in range(128)Invalid RTF: File not ascii encoded.\n") Traceback (most recent call last): File "parallel.py", line 958, in worker File "parallel.py", line 916, in work File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 167, in any2epub File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 86, in rtf2opf File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\rtf\c onvert_from.py", line 144, in generate_html File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\rtf\c onvert_from.py", line 134, in generate_xml File "calibre\ebooks\rtf2xml\ParseRtf.pyo", line 237, in parse_rtf InvalidRtfException: 'ascii' codec can't decode byte 0xa7 in position 10: ordinal not in range(128)Invalid RTF: File not ascii encoded. ------------------------------------------------------------------ is there sth I should know? |
05-04-2009, 04:34 PM | #2 |
sleepless reader
Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Seems as your source rtf uses a Unicode or ISO character encoding and Calibre tries US-ASCII instead. You live in france? I guess your rtf uses ISO-8859-1 or ISO-8859-15 (or maybe just cp1252) then. You can tell calibre the source encoding in the "Layout"-section of the conversation dialog...
|
Advert | |
|
05-04-2009, 05:13 PM | #3 |
creator of calibre
Posts: 44,380
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
According to the RTF spec, RTF should never contain non ASCII characters, non ASCII characters should be ASCII encoded. Try saving your RTF as HTML and then converting it
|
05-04-2009, 05:17 PM | #4 | |
Dry fruit
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
|
Quote:
Do you have an English version of this? Only kidding : Er... Yes I live in France (nobody's perfect) & I do what to what where did you say? SO, seriously: I start from a .txt dowloaded from gallica; I take it in Word... oops sorry I converted it to .rtf so maybe that's the problem? I also had a problem trying to import a (this time) .txt in LyX & it gave me all sorts of characters instead of accented letters... (I can't possibly give up ePUB or Queen Z is going to be cross at me...) |
|
05-04-2009, 05:18 PM | #5 |
Dry fruit
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
|
|
Advert | |
|
05-04-2009, 05:27 PM | #6 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
If you save it as HTML, use the "web page filtered" option (i.e. you want the simplest HTML Word will produce).
Another alternative might be to use OpenOffice, because Calibre can import its .otf files directly. |
05-04-2009, 05:28 PM | #7 | |
sleepless reader
Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Quote:
Uh, well. Is my english really that bad? |
|
05-04-2009, 05:41 PM | #8 |
sleepless reader
Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Afaik the current RTF spec allows ANSI characters (numerical range 128-255) within document text.
|
05-04-2009, 05:48 PM | #9 |
Dry fruit
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
|
|
05-04-2009, 05:51 PM | #10 |
Dry fruit
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
|
|
05-04-2009, 06:27 PM | #11 |
creator of calibre
Posts: 44,380
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
05-06-2009, 01:55 AM | #12 |
Addict
Posts: 207
Karma: 19597
Join Date: Apr 2006
Location: Northern Virginia
Device: Nook Glowlight Plus
|
Actually I have aa similar problem with some .rtf files of mine.
When I save them as html I get some weird code showing up throughout the document. When I save them as Open Office files as you suggested, Word won't even open them unless I convert them to ASCII first which again gives me weird code and screws up the formatting. I have '07 SP2. |
05-06-2009, 02:28 AM | #13 | |
Dry fruit
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
|
Quote:
* In MSWord : save text as .txt / UTF8 * In Lyx : import .txt & export as .html => it seems to give acorrect HTML Problem : you lose the "enrichments" of the .rtf (italics...) |
|
05-11-2009, 07:54 PM | #14 | |
Resident Curmudgeon
Posts: 75,981
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
What's wrong with HTML from World using Web Page, Filtered? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert RTF to epub | Moredread | ePub | 15 | 05-22-2013 09:11 PM |
RTF to epub convert images turn out small | sassanik | Calibre | 1 | 10-16-2010 12:14 AM |
PRS-700 Unable to convert pdf to other formats (epub/rtf/doc) | testndtv | Sony Reader | 1 | 09-24-2010 01:45 PM |
Unable to convert RTF files to ePub | Chrysanthemum | Calibre | 14 | 07-07-2010 01:57 PM |
Convert RTF to ePub -some questions | Laurentiu | ePub | 9 | 01-26-2010 09:11 AM |