View Single Post
Old 12-19-2015, 04:41 PM   #31
crankypants
Hmm.
crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.
 
Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
Hi, I just got my software to make an EPUB file from MultiMarkdown working.

Quote:
1a- What's the difference between encoding in UTF-8 and UTF-16 (or UTF-32)?
Not sure, but you need to write XHTML files in UTF-8 to get German and other accented characters working. Here's my first few lines from OEBPS/content.opf:

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">

Quote:
1b- And are there benefits going off the UTF-8 format?
Yes, displaying accented characters properly.

Quote:
1c- I've seen books omit the encoding type in the container.xml. Recommendable, or not?
I don't know. I always include the encoding type, more info is better, and also it's not worth it to read 8 hrs of documentation to find the answer.

Quote:
2- I've read, but want to confirm, if ZIP is the only compression format allowed? 7z, or RAR would not work, correct?
Yes, ZIP is the ONLY format allowed. If you want to see what's inside an EPUB, copy filename.epub to filename.zip, and look inside.


Quote:
3- If ZIP is, then what parameters should I use? I know at times it is possible to increase compression in some programs, and wondered if it would affect my ebook reader, in trying to open the file?
You need to add the mimetype file first, no compression. Then in a second command line, add the rest of the files. Get zip from www.info-zip.org. It's what I use. Here are the 2 command lines I use to make an epub:

Code:
zip  -X0 filename.epub mimetype
zip -r filename.epub OEBPS/content.opf OEBPS/images/*.* OEBPS/styles/*.* OEBPS/Text/*.* OEBPS/toc.ncx META-INF/container.xml
-X0 does not compress mimetype.

Be careful of case! Case matters here!


Quote:
4- A few years ago, I remember someone posting a link, to a program where mimetype was fused in a zip container (without it being compressed as well).
The program also claimed it compressed far better than Winzip, because it solely focused on text and picture compression, not audio or video, and thus was able to get higher compression ratios.
Which program was this?
Sounds like it doesn't create zip files then. There have been some programs that compress better than ZIP, like bzip and 7zip (for the .7z file). See the Archive Comparison Test at http://compression.ca/. It has every known compression program.

Quote:
5- What program would you think is best to use to generate an .epub file, knowing that all other files are sorted and available? (meaning mimetype, META-INF folder, and the OEBPS folder are complete)?
Probably Sigil for an authoring program. I've used Calibre too but I just liked Sigil better. I don't think Calibre has regex replace while Sigil does. I was using Sigil to copy and paste plain text into Sigil, until I got curious enough to write my own EPUB creator which takes MultiMarkdown as input.

Or, if you meant a zip creator, info-zip. It's command line can be embedded in almost any language, I happen to use Perl.
crankypants is offline   Reply With Quote