• Tag cloud

Problem using Kompozer to edit HTML for e-book

Familiar with web-design ? Trouble with images, tables ? Any other queries ?

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

Problem using Kompozer to edit HTML for e-book

Postby webfolk on Wed Nov 03, 2010 10:02 pm

I'm editing an HTML file using Kompozer 0.8b3 on a MacBook Pro OS 10.5.8. The HTML file was created in Calibre (open source e-book management and format conversion software) as a ZIP which I unzipped with The Archiver and then opened in Kompozer. Working in Source View I edited the file including some of the CSS. In Design View, the edited text looks as it should, but when I save it, some of the punctuation in the resulting html goes screwy: an apostrophe becomes ’, left quote becomes “, right quote becomes ” and so forth. The same thing happened in another attempt when I edited the CSS using the CSS editor.

When saving, I'm using the default "Retain original source formatting". Should I use "Reformat HTML source"? ... or is there some other way to make this right. Any help or hints would be appreciated. Thanks!
webfolk
 
Posts: 33
Joined: Wed Aug 18, 2010 5:20 pm
Country: United States (us)

Re: Problem using Kompozer to edit HTML for e-book

Postby BobCP on Wed Nov 03, 2010 11:06 pm

In the "Advanced" options, make sure that the Don't encode special characters... box is checked.

But, this might also be a problem if you're using Unicode characters.
BobCP
Moderator
 
Posts: 1458
Joined: Sat May 26, 2007 10:03 am
Location: Connecticut

Re: Problem using Kompozer to edit HTML for e-book

Postby wink0r on Wed Nov 03, 2010 11:14 pm

The examples you cite are characteristic of character encoding issues. You can change the character encoding on the format>page title and properties window. Select the character encoding to match your original document.
wink0r
 
Posts: 2594
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Problem using Kompozer to edit HTML for e-book

Postby webfolk on Wed Nov 03, 2010 11:20 pm

BobCP wrote:In the "Advanced" options, make sure that the Don't encode special characters... box is checked.

It wasn't checked, so I checked it, then "Saved as" a different file name: same problem. Thanks, though!
webfolk
 
Posts: 33
Joined: Wed Aug 18, 2010 5:20 pm
Country: United States (us)

Re: Problem using Kompozer to edit HTML for e-book

Postby webfolk on Wed Nov 03, 2010 11:55 pm

wink0r wrote:The examples you cite are characteristic of character encoding issues. You can change the character encoding on the format>page title and properties window. Select the character encoding to match your original document.

This sounds very promising. You do this by selecting a character set, is that correct? How do I identify the character encoding of the original document? Can you determine this by looking at the original HTML? I've been Googling around since receiving this post and found that calibre does not support Unicode text encoding, but don 't know what encoding it used to generate the HTML.
webfolk
 
Posts: 33
Joined: Wed Aug 18, 2010 5:20 pm
Country: United States (us)

Re: Problem using Kompozer to edit HTML for e-book

Postby Lem3 on Thu Nov 04, 2010 12:32 am

webfolk wrote:I've been Googling around since receiving this post and found that calibre does not support Unicode text encoding, but don 't know what encoding it used to generate the HTML.

Try Windows 1252.
Lem3
Moderator
 
Posts: 273
Joined: Sun Jun 22, 2008 3:39 pm
Location: Texas

Re: Problem using Kompozer to edit HTML for e-book

Postby webfolk on Thu Nov 04, 2010 12:51 am

Lem3 wrote:Try Windows 1252.

Thanks, Lem, but that didn't work.
webfolk
 
Posts: 33
Joined: Wed Aug 18, 2010 5:20 pm
Country: United States (us)

Re: Problem using Kompozer to edit HTML for e-book

Postby wink0r on Thu Nov 04, 2010 12:59 am

If you look at the html file in a text editor there should be a line in the head section similar to:
Code: Select all
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />


You would be interested in the charset= part and see if it is in the KompoZer list.
wink0r
 
Posts: 2594
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Problem using Kompozer to edit HTML for e-book

Postby Lem3 on Thu Nov 04, 2010 3:23 am

Try opening the unzipped file in a text editor first and Save As a .txt file. Probably need to open that file and Save As html before bringing into Kompozer. That may convert the "smart quotes" into their base equivalents. Or maybe not, since I'm told that Windows and Mac systems have different code points for "smart quotes" in their standard character sets.

On Kompozer 0.7 there is an option under File for Save and Change Character Encoding. Try that with UTF-8.
Last edited by Lem3 on Thu Nov 04, 2010 3:26 am, edited 1 time in total.
Lem3
Moderator
 
Posts: 273
Joined: Sun Jun 22, 2008 3:39 pm
Location: Texas

Re: Problem using Kompozer to edit HTML for e-book

Postby webfolk on Thu Nov 04, 2010 3:43 am

Before proceeding further and following each of your suggestions, winkOr & Lem 3, I'm going to quit out of everything and restart my computer. Kompozer has been acting a little weird so I want to at least start fresh. I've been reluctant to do this because it means I'll be losing my edited file that still looks good in Kompozer ... again. When I closed my first attempt at a file edit earlier in the day, it carried the problem back into Kompozer when I opened the same file again. Thanks for your help, gentlemen!
webfolk
 
Posts: 33
Joined: Wed Aug 18, 2010 5:20 pm
Country: United States (us)


Return to General Q & A


Who is online

Users browsing this forum: No registered users and 1 guest