Umlauts are not correct when complied on TFS Teambuild
Moderators: Alexander Halser, Tim Green
-
- Posts: 6
- Joined: Wed Feb 01, 2017 12:45 pm
Umlauts are not correct when complied on TFS Teambuild
Similar to the problem descripted here: https://helpman.it-authoring.com/viewtopic.php?t=9294
I have the problem that some umlauts are not displayed correct after exporting to CHM. The texts in general are OK in the CHM files, but the titles are not. I only have that problem when running the CHM export in our TFS Teambuild with the help of Helpman.exe. I use edited targets in the csproj file to run helpman.exe. I also looked at the system locals settings, but they are both the same locally and on the build server. Is there a trick to force helpman.exe to use a special system local? Can anybody help with this problem?
Thanks Ulrich
I have the problem that some umlauts are not displayed correct after exporting to CHM. The texts in general are OK in the CHM files, but the titles are not. I only have that problem when running the CHM export in our TFS Teambuild with the help of Helpman.exe. I use edited targets in the csproj file to run helpman.exe. I also looked at the system locals settings, but they are both the same locally and on the build server. Is there a trick to force helpman.exe to use a special system local? Can anybody help with this problem?
Thanks Ulrich
- Tim Green
- Site Admin
- Posts: 23186
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Umlauts are not correct when complied on TFS Teambuild
Hi Ulrich,
As you have guessed, this will be a problem with the system locale on the system where the CHM is being generated. The Microsoft CHM system and compiler are creaky, ancient and full of old, old bugs, and have not been updated or bugfixed since they were originally released with Windows 98. It is not a Unicode system and requires help from Windows in the form of the to be able to display and process special character sets at all.
Help+Manual can't change this while compiling, but there is a command line tool from Microsoft that might be able to help you here. See this tutorial for details:
https://helpman.it-authoring.com/viewto ... 295#p41866
I can't promise that this would work in your TFS environment but it is worth a try, because it is the only thing that could work. Otherwise you are going to need to compile your CHMs on a separate computer where you can set the locale.
As you have guessed, this will be a problem with the system locale on the system where the CHM is being generated. The Microsoft CHM system and compiler are creaky, ancient and full of old, old bugs, and have not been updated or bugfixed since they were originally released with Windows 98. It is not a Unicode system and requires help from Windows in the form of the to be able to display and process special character sets at all.
Help+Manual can't change this while compiling, but there is a command line tool from Microsoft that might be able to help you here. See this tutorial for details:
https://helpman.it-authoring.com/viewto ... 295#p41866
I can't promise that this would work in your TFS environment but it is worth a try, because it is the only thing that could work. Otherwise you are going to need to compile your CHMs on a separate computer where you can set the locale.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 6
- Joined: Wed Feb 01, 2017 12:45 pm
Re: Umlauts are not correct when complied on TFS Teambuild
Thank you for your help! Sadly this didn’t help. After some workarounds I got AppLoc.exe to run, but with no success. As I mentioned in my post the system local of both machines where the same and are the local that I want to generate the help in anyways. The local is German with shouldn’t be a problem anyways. It is only the titles of the CHM-Windows that are corrupt. Everything is fine on my local Win10 machine. The build server is Win2008R2.
- Tim Green
- Site Admin
- Posts: 23186
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Umlauts are not correct when complied on TFS Teambuild
Hi Ulrich,
This is strange and sounds like something odd in the TFS environment. If it was the system locale you would also be having problems in the TOC, not just in the title bar of the viewer window. I've asked our resident CHM guru if he can think of anything that might be causing this. I'll post again when I have more information.
Otherwise you may have to use ue, ae and oe for the titles on that platform.
This is strange and sounds like something odd in the TFS environment. If it was the system locale you would also be having problems in the TOC, not just in the title bar of the viewer window. I've asked our resident CHM guru if he can think of anything that might be causing this. I'll post again when I have more information.
Otherwise you may have to use ue, ae and oe for the titles on that platform.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Umlauts are not correct when complied on TFS Teambuild
Hi Ulrich,
I think that the Microsoft help compiler mangles the umlauts. Please export your help manually and untick the box to delete the temporary files. This will create a folder called ~tmpchm in the project folder. In a second step, run the help compiler directly - ideally from a batch file. That batch file should be called (a) directly and (b) from your TFS Teambuild to see the difference.
You find the path to the help compiler in the "Program Settings" dialog. The actual file executed is "HHC.EXE" (typically: "C:\Program Files (x86)\HTML Help Workshop\hhc.exe"). This is the console version of the MS help compiler. Run it with the following sytnax:
"C:\Program Files (x86)\HTML Help Workshop\hhc.exe" "<fullpathtoyourproject>\~tmpchm\yourhelpproject.HHP"
It should compile, finish and output the CHM file in both cases. Do you get the same difference in TFS Teambuild?
I think that the Microsoft help compiler mangles the umlauts. Please export your help manually and untick the box to delete the temporary files. This will create a folder called ~tmpchm in the project folder. In a second step, run the help compiler directly - ideally from a batch file. That batch file should be called (a) directly and (b) from your TFS Teambuild to see the difference.
You find the path to the help compiler in the "Program Settings" dialog. The actual file executed is "HHC.EXE" (typically: "C:\Program Files (x86)\HTML Help Workshop\hhc.exe"). This is the console version of the MS help compiler. Run it with the following sytnax:
"C:\Program Files (x86)\HTML Help Workshop\hhc.exe" "<fullpathtoyourproject>\~tmpchm\yourhelpproject.HHP"
It should compile, finish and output the CHM file in both cases. Do you get the same difference in TFS Teambuild?
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
-
- Posts: 6
- Joined: Wed Feb 01, 2017 12:45 pm
Re: Umlauts are not correct when complied on TFS Teambuild
Hi Alexander,
Thank you for your time. I looked in the temporary files and the problem is in there already.
On my local Win10 Machine it’s:
…
[WINDOWS]
Main="Feldgeräte und Feldanbindung","FLD.hhc","FLD.hhk","hid_feldgeraete.htm","hid_feldgeraete.htm","","jump1","","jump2",0x061520,200,0x00304E,[-1,-1,-1,-1],0xb0000,,,,,,0
…
Here is a part of the hhp file on the build server:
[OPTIONS]
Compatibility=1.1
Compiled file=E:\Temp\FLD\FLD.chm
Contents file=FLD.hhc
Default Window=Main
Default topic=hid_feldgeraete.htm
Default font=Arial,10,0
Index file=FLD.hhk
Auto Index=No
Display compile progress=No
Full-text search=Yes
Language=0x0409
Title=Feldger?te und Feldanbindung
Error log file=E:\Temp\FLD\~tmpchm\FLD.log
[WINDOWS]
Main="Feldger?te und Feldanbindung","FLD.hhc","FLD.hhk","hid_feldgeraete.htm","hid_feldgeraete.htm","","jump1","","jump2",0x061520,200,0x00304E,[-1,-1,-1,-1],0xb0000,,,,,,0
Task="Feldger?te und Feldanbindung","FLD.hhc","FLD.hhk","hid_feldgeraete.htm","hid_feldgeraete.htm","","Jump1","","Jump2",0x061520,200,0x00200E,[560,5,1277,694],0x830000,,,,2,,0
Field="Feldger?te und Feldanbindung","","","hid_feldgeraete.htm","hid_feldgeraete.htm","","Jump1","","Jump2",0x040100,0,0x0,[780,80,1180,570],0x830000,,,,2,,0
Dialog="Feldger?te und Feldanbindung","","","hid_feldgeraete.htm","hid_feldgeraete.htm","","Jump1","","Jump2",0x040100,0,0x003002,[69,17,869,717],0x830000,,,,2,,0
[FILES]
hid_feldgeraete.htm
hid_flddlg_dialoge.htm
…
Thank you for your time. I looked in the temporary files and the problem is in there already.
On my local Win10 Machine it’s:
…
[WINDOWS]
Main="Feldgeräte und Feldanbindung","FLD.hhc","FLD.hhk","hid_feldgeraete.htm","hid_feldgeraete.htm","","jump1","","jump2",0x061520,200,0x00304E,[-1,-1,-1,-1],0xb0000,,,,,,0
…
Here is a part of the hhp file on the build server:
[OPTIONS]
Compatibility=1.1
Compiled file=E:\Temp\FLD\FLD.chm
Contents file=FLD.hhc
Default Window=Main
Default topic=hid_feldgeraete.htm
Default font=Arial,10,0
Index file=FLD.hhk
Auto Index=No
Display compile progress=No
Full-text search=Yes
Language=0x0409
Title=Feldger?te und Feldanbindung
Error log file=E:\Temp\FLD\~tmpchm\FLD.log
[WINDOWS]
Main="Feldger?te und Feldanbindung","FLD.hhc","FLD.hhk","hid_feldgeraete.htm","hid_feldgeraete.htm","","jump1","","jump2",0x061520,200,0x00304E,[-1,-1,-1,-1],0xb0000,,,,,,0
Task="Feldger?te und Feldanbindung","FLD.hhc","FLD.hhk","hid_feldgeraete.htm","hid_feldgeraete.htm","","Jump1","","Jump2",0x061520,200,0x00200E,[560,5,1277,694],0x830000,,,,2,,0
Field="Feldger?te und Feldanbindung","","","hid_feldgeraete.htm","hid_feldgeraete.htm","","Jump1","","Jump2",0x040100,0,0x0,[780,80,1180,570],0x830000,,,,2,,0
Dialog="Feldger?te und Feldanbindung","","","hid_feldgeraete.htm","hid_feldgeraete.htm","","Jump1","","Jump2",0x040100,0,0x003002,[69,17,869,717],0x830000,,,,2,,0
[FILES]
hid_feldgeraete.htm
hid_flddlg_dialoge.htm
…
-
- Posts: 6
- Joined: Wed Feb 01, 2017 12:45 pm
Re: Umlauts are not correct when complied on TFS Teambuild
Hi Alexander,
This is a little odd but I found out that the hmxp- file is the problem. When I try to open it with Notepad++ on the build server I get an error: “XML Parsing error at line 1: Input is not proper UTF-8, indicate encoding ! Bytes: 0xE4 0x74 0x65 0x20”
I saved the hmxp file on the win10 machine with notepad++ (UTF-8 without BOM) and it worked on the build server. Output chm and also the hhp is perfect.
My problem is that Help and Manual saves the hmxp file. Is there an option where you can choose the encoding of the hmxp-file?
Thanks Ulrich
This is a little odd but I found out that the hmxp- file is the problem. When I try to open it with Notepad++ on the build server I get an error: “XML Parsing error at line 1: Input is not proper UTF-8, indicate encoding ! Bytes: 0xE4 0x74 0x65 0x20”
I saved the hmxp file on the win10 machine with notepad++ (UTF-8 without BOM) and it worked on the build server. Output chm and also the hhp is perfect.
My problem is that Help and Manual saves the hmxp file. Is there an option where you can choose the encoding of the hmxp-file?
Thanks Ulrich
-
- Posts: 6
- Joined: Wed Feb 01, 2017 12:45 pm
Re: Umlauts are not correct when complied on TFS Teambuild
OK the problem is related with TFS and the "get" on the build machine. Somehow the BOM seems to get corrupted
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Umlauts are not correct when complied on TFS Teambuild
Yes, it looks like that.OK the problem is related with TFS and the "get" on the build machine.
All XML source files of Help+Manual are UTF8 encoded with BOM. The HMXP, the topic XML files. Always.
The temporary CHM sources created by H&M, however, are ANSI encoded, because the HTML Help compiler doesn't understand UTF8.
If TFS changes the encoding of the temporary CHM source files and serves them as UTF-8 encoded content, this would explain the umlaut problem. Because in German it affects the umlauts and "ß". Everything else in German is identical to an UTF8 encoded content. Furthermore it affects only the temporary HHP project file, plus keyword index and TOC. In the temporary HTML files for the CHM, umlauts are escaped, so you don't notice any encoding change there. The TOC, however, must be affected as well.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
-
- Posts: 6
- Joined: Wed Feb 01, 2017 12:45 pm
Re: Umlauts are not correct when complied on TFS Teambuild
I solved the problem by deleting the help project files in the teambuild folder and forcing the TFS to get them new. I have no glue why the TFS messed them up? It was simply the hmxp file that had an wrong BOM. So not a problem of Help and Manual at all, with could open the file and tried to fix the wrong BOM.
Thanks for your Help!
Ulrich
Thanks for your Help!
Ulrich