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 05-04-2009, 04:09 PM   #1
YGG-
Dry fruit
YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.
 
YGG-'s Avatar
 
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?
YGG- is offline   Reply With Quote
Old 05-04-2009, 04:34 PM   #2
netseeker
sleepless reader
netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.
 
netseeker's Avatar
 
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...
netseeker is offline   Reply With Quote
Old 05-04-2009, 05:13 PM   #3
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: 43,782
Karma: 22666666
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
kovidgoyal is offline   Reply With Quote
Old 05-04-2009, 05:17 PM   #4
YGG-
Dry fruit
YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.
 
YGG-'s Avatar
 
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
Quote:
Originally Posted by netseeker View Post
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...
Ooof! Thanks...
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...)
YGG- is offline   Reply With Quote
Old 05-04-2009, 05:18 PM   #5
YGG-
Dry fruit
YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.
 
YGG-'s Avatar
 
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
Quote:
Originally Posted by kovidgoyal View Post
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
Ok I'll try this thanks... (and thanks too to you, Netseeker)
YGG- is offline   Reply With Quote
Old 05-04-2009, 05:27 PM   #6
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
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.
wallcraft is offline   Reply With Quote
Old 05-04-2009, 05:28 PM   #7
netseeker
sleepless reader
netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.
 
netseeker's Avatar
 
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:
Originally Posted by YGG- View Post
Ooof! Thanks...
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? [SIZE=1]
[SIZE=2]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?

Uh, well. Is my english really that bad?
netseeker is offline   Reply With Quote
Old 05-04-2009, 05:41 PM   #8
netseeker
sleepless reader
netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.netseeker ought to be getting tired of karma fortunes by now.
 
netseeker's Avatar
 
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:
Originally Posted by kovidgoyal View Post
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
Afaik the current RTF spec allows ANSI characters (numerical range 128-255) within document text.
netseeker is offline   Reply With Quote
Old 05-04-2009, 05:48 PM   #9
YGG-
Dry fruit
YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.
 
YGG-'s Avatar
 
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
Quote:
Originally Posted by netseeker View Post

Uh, well. Is my english really that bad?
Your English is perfect, it's your computerese I don't get
YGG- is offline   Reply With Quote
Old 05-04-2009, 05:51 PM   #10
YGG-
Dry fruit
YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.
 
YGG-'s Avatar
 
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
Quote:
Originally Posted by wallcraft View Post
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.
Maybe I should get OpenOffice, hm?
YGG- is offline   Reply With Quote
Old 05-04-2009, 06:27 PM   #11
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: 43,782
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by YGG- View Post
Maybe I should get OpenOffice, hm?
Actually I believe Microsoft Office 2007 SP2 can now create OpenOffice format files directly.
kovidgoyal is offline   Reply With Quote
Old 05-06-2009, 01:55 AM   #12
Kosst Amojan
Addict
Kosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to beholdKosst Amojan is a splendid one to behold
 
Kosst Amojan's Avatar
 
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.
Kosst Amojan is offline   Reply With Quote
Old 05-06-2009, 02:28 AM   #13
YGG-
Dry fruit
YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.YGG- ought to be getting tired of karma fortunes by now.
 
YGG-'s Avatar
 
Posts: 1,157
Karma: 1047086
Join Date: Dec 2008
Location: Paris, France
Device: Bookeen Opus + HTC Desire HD
Quote:
Originally Posted by kovidgoyal View Post
Actually I believe Microsoft Office 2007 SP2 can now create OpenOffice format files directly.
I found a roundabout w/ LyX:
* 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...)
YGG- is offline   Reply With Quote
Old 05-11-2009, 07:54 PM   #14
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: 73,668
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by YGG- View Post
I found a roundabout w/ LyX:
* In MSWord : save text as .txt / UTF8
* In Lyx : import .txt & export as .html => it seems to give a correct HTML
Problem : you lose the "enrichments" of the .rtf (italics...)
Not a good solution then. Losing things like italics, bold, header styles and such is a really bad idea.

What's wrong with HTML from World using Web Page, Filtered?
JSWolf 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
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


All times are GMT -4. The time now is 04:01 AM.


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