Archive: Problem with symbol "&" in the branding text


Problem with symbol "&" in the branding text
Hi!
I have s strange problem. I use symbol "&" in the branding text. When I execute the installer under Windows XP, this symbol is missing, but it exists under Windows 7. I tried also with two symbols "&&" and in this case it is shown correct under Windows XP (only one symbol is shown), but now I see both symbols under Windows 7. So my question is - how to solve the problem without to take care about the OS?


!include "library.nsh"
!include "winver.nsh"
BrandingText "$var"

Function .oninit

${if} ${isWinXP}
Strcpy $var "sometextwith&&"
${else}
Strcpy $var "sometextwith&"
${endif}

FunctionEnd


This is clear, but isn't it possible to do something without check for Windows XP?


I cannot reproduce this. Using double ampersands works fine on both 7 and XP and for MUI2 and classic UI. Can you create a simple script to reproduce?

Stu


I tried to simplify my script. But in a simple script I also can not reproduce it. I will try to investigate what makes the difference and if I have more information, I will write again.
Thank you for the will to help!!!


Now I found the reason. I'm using the Aero plug-in. It causes this behavior. And this explains the difference between Windows XP and Windows 7. If I don't use it, all works as it is expected. Is this a bug in the Aero plug-in?


Yes this is a bug with the plug-in, or rather, a lack of ampersand handling. I will fix as soon as I have some time.

Stu


Thanks a lot!


I think that there is one more problem with this plug-in. I use NSIS v3.0a1 and my installer can switch between English and German texts. When German language is selected, some special letters are not shown correct (in the branding text). This must be connected somehow with the encoding... Actually up to now the branding text was also translated and in this case there is no problem. But I made the workaround given from world80, so I put the text directly (because the translation doesn't work in .onInit function) and now the problem occurs. So with the workaround I have a problem with the special German letters and without it - with the ampersand. There is no full happiness :(