Export Style Names behavior with WebHelp Output

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
julio
Posts: 114
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil
Contact:

Export Style Names behavior with WebHelp Output

Unread post by julio » Wed Sep 16, 2020 2:28 pm

Hi, we are starting to move our documentation from CHM to HTML format and we have just found a problem, both on H&M 7.5.4.4760 and H&M 8.2.0.5620, that is not reproducible on CHM, only on HTML outputs. Here is the situation:
  • We have a style repository that is used for building a wide range of product manuals, all of them in CHM and PDF.
  • This repository contains some styles with names in Brazilian Portuguese, mainly because these styles are used by several colleagues and we wanted to make them easy to recognize and apply. Therefore, a style used for a historical table, for example, is named as "Tabela de Histórico", which is "Historical Table" in Portuguese.
  • When building these manuals to CHM, we deselected the Export Style Names option on Configuration - Publishing Options - Microsoft HTML Help - HTML Export Options, so that these names are transformed into CSS-compatible names, we believed, because this option works fine with CHM files.
  • When we started to test the HTML format, the same Export Style Names option is used for this output, but now on Configuration - Publishing Options - Webhelp - HTML Export Options. When opening the corresponding HTML files, the style of that table is actually renamed to "TabeladeHistórico", which is not a valid CSS name, thus the table does not show any style.
And here are some concerns about this behavior:
  • We don't know why CHMs display that table correctly, because the style is renamed to "TabeladeHistórico" as well, but that apparently does not affect the resulting file. We know CHM is an old unsupported format, but as far as we know, it uses Windows web browser engine to render pages and that problem should be visible there.
  • We thought this Export Style Names option worked similar to the way topic IDs are created, that is, only valid characters are accepted.
  • If we change the name of the style on the repository, will all projects using it automatically get that new name or we must open all projects and change all those references to the new name?
Thanks for any suggestions.

User avatar
Tim Green
Site Admin
Posts: 21839
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Export Style Names behavior with WebHelp Output

Unread post by Tim Green » Thu Sep 17, 2020 7:13 am

Hi Julio,

This works in CHM because the CHM viewer uses IE, which is very forgiving about characters like this used in HTML. In other browsers they will cause errors. I checked with our developers and they say that if you are using characters like this in your style names in WebHelp you must either change the names to use only standard ASCII characters, or turn off the option to export style names.

If you change the names of the styles all references in the project will be updated automatically, so all you need to do is change the names. However, it is probably much easier to use the option to turn off the style names export. This will have exactly the same effect that would happen if Help+Manual was correcting the illegal names anyway: This must change all names completely. It would not be possible to just change individual characters because of the risk that this would then conflict with other names that already exist. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

User avatar
julio
Posts: 114
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil
Contact:

Re: Export Style Names behavior with WebHelp Output

Unread post by julio » Thu Sep 17, 2020 12:53 pm

I am sorry, but I think you misunderstood me, that is exactly what I did when I said I deselected that option, or as you said, turned it off. I know that text styles do correct their names if the option is turned off by changing them to something like 'par1', but I am talking exclusively about table style names, which do not correct their names if the option is turned off. Turning that option off only removes white spaces from table style names.
Anyway, if changing the name on the repository solves this issue, then OK, I will change it on the repository.
Tim Green wrote:
Thu Sep 17, 2020 7:13 am
However, it is probably much easier to use the option to turn off the style names export. This will have exactly the same effect that would happen if Help+Manual was correcting the illegal names anyway: This must change all names completely.

User avatar
Tim Green
Site Admin
Posts: 21839
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Export Style Names behavior with WebHelp Output

Unread post by Tim Green » Thu Sep 17, 2020 4:45 pm

Hi Julio,

Sorry, I did misunderstand you. We will check into the issue with the table style names.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

User avatar
Alexander Halser
EC-Software Support
Posts: 3997
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Export Style Names behavior with WebHelp Output

Unread post by Alexander Halser » Thu Sep 17, 2020 9:51 pm

Hi Julio,

We have identified the problem. Those accented characters are perfectly valid in HTML5. However, the CSS stylesheet that H&M exports was ANSI-encoded (the Webhelp output is generally UTF-8 encoded). In most cases, the encoding of the CSS doesn't matter, but for style names with accented characters in the Unicode range, it does. Several browsers interpret the ANSI-encoded style declarations different than the UTF-8 encoded class names in the HTML page.

This is why it has worked in CHM files - these are always ANSI (or double-byte) encoded, because the CHM compiler does not understand Unicode. In that case, the CSS file and the HTML class names were a match.

We have fixed the problem with build 5632:
https://www.helpandmanual.com/download/ ... p-v821.exe
Alexander Halser
Senior Software Architect, EC Software GmbH

User avatar
julio
Posts: 114
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil
Contact:

Re: Export Style Names behavior with WebHelp Output

Unread post by julio » Fri Sep 18, 2020 12:40 pm

Ah, yes, now everything makes sense. The "ó" character becomes xF3 in UTF-8 and obviously it doesn't work. Thank you very much for your help.
Alexander Halser wrote:
Thu Sep 17, 2020 9:51 pm
Hi Julio,

We have identified the problem. Those accented characters are perfectly valid in HTML5. However, the CSS stylesheet that H&M exports was ANSI-encoded (the Webhelp output is generally UTF-8 encoded). In most cases, the encoding of the CSS doesn't matter, but for style names with accented characters in the Unicode range, it does. Several browsers interpret the ANSI-encoded style declarations different than the UTF-8 encoded class names in the HTML page.

This is why it has worked in CHM files - these are always ANSI (or double-byte) encoded, because the CHM compiler does not understand Unicode. In that case, the CSS file and the HTML class names were a match.

We have fixed the problem with build 5632:
https://www.helpandmanual.com/download/ ... p-v821.exe

Post Reply