Archive: can't use quotes in string for MUI_WELCOMEPAGE_TITLE


can't use quotes in string for MUI_WELCOMEPAGE_TITLE
Hi folks,

wanted to use this string in a welcome page. Got the string from NSIS help showing usage of quoted strings. I don't really need this feature, but you should know about it. Either this not implemented or the string in the MUI macros for the welcome page is not properly used. Any comments on this?

!define MUI_WELCOMEPAGE_TITLE "$\"A quote from a wise man$\" said the wise man"
!insertmacro MUI_PAGE_WELCOME

NSIS compiler reports this:
Error in macro MUI_INSTALLOPTIONS_WRITE on macroline 5
Error in macro MUI_FUNCTION_WELCOMEPAGE on macroline 10
Error in macro MUI_PAGE_WELCOME on macroline 23


If you dont mind single qoutes you can do:
!define MUI_WELCOMEPAGE_TITLE "'A quote from a wise man' said the wise man"
otherwise, write to the .ini directly:

function fixwelcomepage
WriteIniStr "$pluginsdir\ioSpecial.ini" "Field 2" "Text" '"A quote from a wise man" said the wise man'
functionend
!define MUI_PAGE_CUSTOMFUNCTION_PRE fixwelcomepage
!insertmacro MUI_PAGE_WELCOME

the MUI docs say you should be able to escape so I guess this is a bug


Escape it twice like so:

!define MUI_WELCOMEPAGE_TITLE "$\$\"A quote from a wise man$\$\" said the wise man"

This has to be done because the unescaping is done twice. Probably when the text is passed via a macro parameter or something.

-Stu


the docs should be updated then


@Anders: single quotes work. Thanks, but my text needs double quotes.

@AfrowUK: this works like a charm.


what about using:

`'"blabla"'` ?

nsis will then remove one quotation after another and if it removes 2 quotations, hey, there is still the third one, the double quotes.


Thanks for all proposals. The challenge with this example is the documentation that leads the average NSIS user or even the beginner to proper usage of such quotes constructs. How this knowledge goes into the docs???