PDA

View Full Version : umlauts in INSTDIR

hhausch
19th June 2008, 12:35
Hello !

My installer tries to replace a placeholder in a xml file with the value of INSTDIR with a macro called "ReplaceInFile". It works nice as long as there are no umlauts in INSTDIR. If there are umlauts in INSTDIR the file is corrupted. Notepad does not show the file correctly (it omits the chars), my java-application cannot handle the file too but wordpad shows all chars (File is UTF-8 before the modification and afterwards too).

#filedir# will be replaced with c:\program files\programÃ„_Ã–_Ãœ; result is c:\program files\program<npc>_<npc>_<npc>

<npc>: not printable char

So it looks like the inserted chars use the wrong encoding. Any ideas how to insert umlauts in the correct encoding ?

Thanks,

Helge

LazyBear
19th June 2008, 12:54
Do you have an encoding in your XML-File?
I think you should use ISO 8859-1 like below

<?xml version="1.0" encoding="ISO-8859-1" ?>

hhausch
19th June 2008, 13:12
Hi LazyBear,

:igor:, thanks for the help. Sometimes u do not think about the easy way ... of course the xml got an encoding but no one prevents me from changing it.

Helge