Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use only unicode in nsis?

Tags:

nsis

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".

like image 697
ilias iliadis Avatar asked Oct 24 '25 20:10

ilias iliadis


1 Answers

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
like image 166
Anders Avatar answered Oct 27 '25 01:10

Anders