1
votes

I am evaluating nsis. I want to create an installer (using mui2) which will use the provided Unicode strings (for titles, buttons, labels etc.) and not to use any "localization".

For example: the application title contains unicode characters from different languages (let's say: "Λεξικό-Dictionary-Речник" will be the whole title, regardless of the user "language")

Is there a simple way to use the provided exact unicode strings independently of the mui language?

EDIT (as commented) : The above is about having own Unicode strings for buttons and, in general, UI text (no localization). Is not about any source (or destination) "filename" or "path".

2
Are you saying you want to provide your own strings for buttons and all UI text (no localization) or do you just want the application name to be the same no matter what happens to the rest of the UI? - Anders
I never asked about filenames. It is still unclear to me if you want to use custom strings in your UI or the default NSIS strings (the name of the installer is not a default string, it is always custom). - Anders

2 Answers

5
votes

NSIS will not translate the name, just make sure you save the .NSI source file as UTF-8 with BOM/Signature or UTF-16 with a BOM if you use non-ASCII characters.

Unicode True
Name "Λεξικό-Dictionary-Речник"
OutFile "MyInstaller.exe"
InstallDir "$ProgramFiles\$(^Name)"

!include MUI2.nsh

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE English

Section
SetOutPath $InstDir
File /r "c:\myfiles\*.*"
SectionEnd

It is also possible to manually construct Unicode characters from Unicode code points:

Section
MessageBox MB_OK "${U+2115}SIS" # DOUBLE-STRUCK CAPITAL N + "SIS"
SectionEnd
0
votes

The problem was I saved the file as UTF8 (!!!). After saving the file from Notepad as Unicode the problem disappeared.