TrifonovS
12th November 2013 07:24 UTC
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?
world80
12th November 2013 10:29 UTC
!include "library.nsh"
!include "winver.nsh"
BrandingText "$var"
Function .oninit
${if} ${isWinXP}
Strcpy $var "sometextwith&&"
${else}
Strcpy $var "sometextwith&"
${endif}
FunctionEnd
TrifonovS
12th November 2013 10:33 UTC
This is clear, but isn't it possible to do something without check for Windows XP?
Afrow UK
12th November 2013 11:06 UTC
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
TrifonovS
12th November 2013 13:18 UTC
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!!!
TrifonovS
12th November 2013 13:28 UTC
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?
Afrow UK
12th November 2013 16:44 UTC
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
TrifonovS
12th November 2013 21:59 UTC
Thanks a lot!
TrifonovS
19th November 2013 19:54 UTC
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 :(