Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-13-2017, 06:36 AM   #1
Daadaa
Junior Member
Daadaa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Denver MPM-4014, PC
Creating an optional conversion profile?

I have a handheld music/video player that has a very rudimentary support for reading. It can open plain .txt documents and they need to be in ascii, it seems.

So I'd like to find a quick way to change input settings but I don't want to save them as default. Something that would always remove any fancy formatting and convert unicode characters to plain ascii. It would be used when converting from any format to .txt. What would be the easiest way to do that? (Note: Looking for a relatively simple solution for a noob. If it's going to be time consuming I think I'd rather just change the options manually when needed.)

And I have another question. How to remove the table of contents - they're pointless in .txt files?
Daadaa is offline   Reply With Quote
Old 04-13-2017, 11:16 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Daadaa - try this; in conversion (eg EPUB->TXT), change the Output settings for TXT, set encoding to ascii, you'll have to find the right line ending (one of 4), and you may have to force a max line length if your gadget doesn't do line wrap - there's a checkbox for ToC, leave it unchecked.

When you've determined the settings that suit your gadget, adjust the default settings in Preferences->Conversion->Output->TXT.

BR
BetterRed is offline   Reply With Quote
Advert
Old 04-13-2017, 04:13 PM   #3
Daadaa
Junior Member
Daadaa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Denver MPM-4014, PC
Quote:
Originally Posted by BetterRed View Post
@Daadaa - try this; in conversion (eg EPUB->TXT), change the Output settings for TXT, set encoding to ascii, you'll have to find the right line ending (one of 4), and you may have to force a max line length if your gadget doesn't do line wrap - there's a checkbox for ToC, leave it unchecked.

When you've determined the settings that suit your gadget, adjust the default settings in Preferences->Conversion->Output->TXT.

BR
I'm afraid it doesn't work. This is what it does to Finnish

Quote:
ALEKSIS KIVI



1890.

Seitsem?n veljest? ilmestyi ensimm?isen kerran v. 1870
nelj?n? vihkona, yhten? niteen? 1873.





ENSIMM?INEN LUKU



Jukolan talo, etel?isess? H?meess?, seisoo er??n m?en
pohjaisella rinteell?, liki Toukolan kyl??. Sen l?heisin
ymp?rist? on kivinen tanner, mutta alempana alkaa pellot,
joissa, ennenkuin talo oli h?vi??n mennyt, aaltoili
ter?inen vilja. Peltojen alla on niittu, apila?yr?inen,
halkileikkaama monipolvisen ojan; ja runsaasti antoi se
heini?, ennenkuin joutui laitumeksi kyl?n karjalle. Muutoin
on talolla avaria metsi?, soita ja er?maita, jotka, t?m?n
tilustan ensimm?isen perustajan oivallisen toiminnan
kautta, olivat langenneet sille osaksi jo ison-jaon
k?ydess? entisin? aikoina. Silloinpa Jukolan is?nt?, pit?en
enemm?n huolta j?lkeentulevainsa edusta kuin omasta
parhaastansa, otti vastaan osaksensa kulon polttaman mets?n
ja sai sill? keinolla seitsem?n vertaa enemm?n kuin toiset
naapurinsa. Mutta kaikki kulovalkean j?ljet olivat jo
kadonneet h?nen piirist?ns? ja tuuhea mets? kasvanut
sijaan.?Ja t?m? on niiden seitsem?n veljen koto, joiden
el?m?nvaiheita t?ss? nyt k?yn kertoilemaan.
Changing the input to ascii drops diacritics, and although it looks a bit strange, it's readable. You do understand 'Seitseman veljesta' does mean 'Seitsemän veljestä'. I suppose the same thing happens to all kinds of non-standard letters with accent marks.

And it doesn't work for English either. Even if you don't care that there might be occasional loan words or names it would mess with, it also screws up punctuation. An example from Jane Eyre:

Quote:
?She is in the window-seat, to be sure, Jack.?

And I came out immediately, for I trembled at the idea of
being dragged forth by the said Jack.

?What do you want?? I asked, with awkward diffidence.

?Say, ?What do you want, Master Reed??? was the answer. ?I
want you to come here;? and seating himself in an
arm-chair, he intimated by a gesture that I was to approach
and stand before him.
So smartening the punctuation and transliterating unicode to ascii in Look & Feek is pretty much needed, at least. And the player shows those character that are turned to ? as some random chinese or japanese characters or something... and they might cause weird line breaks or spaces between words.
Daadaa is offline   Reply With Quote
Old 04-13-2017, 05:41 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Daadaa - So-called ASCII (properly called US-ASCII) doesn't support diacritics, period. There's only so much you can do in 7 bits. Is your device really limited to 7 bit ASCII or can it cope with 8 bits, the utf-8 encoding option (sometimes referred to a Extended ASCII) has a number of variants.

Re the punctuation - it looks more like it needs unsmartening

I just converted an epub with diacritics (French) and curly quotes using the 'utf-8' variant of utf-8 encoding. The diacritics survived and the curly quotes were straightened.

BR
BetterRed is offline   Reply With Quote
Old 04-14-2017, 01:17 AM   #5
Daadaa
Junior Member
Daadaa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Denver MPM-4014, PC
I haven't been able to find any reference in the instruction booklet to what character encoding the player is supposed to support, but it certainly isn't utf-8. It looks all wrong, just like when it's turned to ascii in output options. It seems that transliterating accented characters to their plain equivalents is necessary.

Yes, you're right about punctuation. So, I think unsmartening the punctuation and changing to ascii in Look & Feel would be the input options that need changing generally. I think I'll just change those manually if I want to make a .txt file.

Edit:

Bad picture, but those blocks are chinese-looking characters. This is a utf-8 .txt file that looks fine on PC:



Edit2:

I was wrong. The player can show utf-8 .txt files right. It just doesn't like them when they are created with Calibre. If I write a text document myself in Notepad and save it as utf-8, it looks like it should in the player. If I open a utf-8 encoded .txt created with Calibre in Notepad and without editing it in any way save a new copy as utf-8, it looks correct in the player when the original does not. They both look the same in Notepad, but the size is slightly different. But in Wordpad any non-standard characters from a Calibre-created utf-8 .txt file look wrong. If I open it in a net browser, it looks wrong unless I change encoding from Western to Unicode.

Obviously there's something wrong with my Windows settings, Calibre 2.72 which I'm using or my installation of Calibre or my Calibre settings.

Last edited by Daadaa; 04-14-2017 at 07:01 AM. Reason: Found out more about the problem
Daadaa is offline   Reply With Quote
Advert
Old 04-14-2017, 10:23 AM   #6
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,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's likely because your reader needs a BOM (byte order marker) -- cetain older windows based software requires that in .txt files when using UTF-8/UTF-16/UTF-32 encodings.

calibre does not add it as it causes problems with other, more modern software. You can always insert it yourself, as you discovered, by opening and saving in notepad.
kovidgoyal is online now   Reply With Quote
Old 04-15-2017, 02:51 AM   #7
Daadaa
Junior Member
Daadaa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Denver MPM-4014, PC
All right. Thanks for the explanation.
Daadaa is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion Output Profile for Kobo Aura HD omnimodis78 Conversion 3 09-30-2016 11:42 AM
Tip - output profile setting can dramatically slow down conversion andrewburt Conversion 5 11-29-2015 02:46 PM
Is conversion creating one or two versions of a book ? glin Calibre 11 02-22-2015 10:28 AM
CS5 to ePub conversion is creating repeating pages backleft Apple Devices 0 07-02-2012 01:01 PM
Conversion Error when creating Catalog thangnh Library Management 1 02-21-2011 08:38 AM


All times are GMT -4. The time now is 02:09 AM.


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