Old 4th August 2017, 13:32   #1
tnteverett
Junior Member
 
Join Date: Jul 2017
Posts: 17
Page Displayed Language Error

Using "Unicode true", the coded language string does not display in page correctly.
For instance
sélectionné
does not display the "é" correctly. What is displayed is an "A" with tilde above and a copyright symbol.

NSIS Version 3.02.1
Windows 7 Pro

Code specifics:
Quote:
; MUI ------
!include "MUI2.nsh"
Unicode true

!define MUI_WELCOMEPAGE_TITLE $(WelcomePageTitleLang)
!define MUI_WELCOMEPAGE_TEXT $(WelcomePageTextLang)
!insertmacro MUI_PAGE_WELCOME

LangString WelcomePageTitleLang ${LANG_ENGLISH} "Welcome to ${PRODUCT_NAME} ${PRODUCT_VERSION} Setup"
LangString WelcomePageTitleLang ${LANG_FRENCH} "Bienvenue dans la configuration ${PRODUCT_NAME} ${PRODUCT_VERSION}"
LangString WelcomePageTextLang ${LANG_ENGLISH} "Setup will guide you through the installation of a selected ${PRODUCT_NAME}.$\r$\n$\r$\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.$\r$\n$\r$\nClick Next to continue."
LangString WelcomePageTextLang ${LANG_FRENCH} "Le programme d'installation vous guidera lors de l'installation d'un ${PRODUCT_NAME} sélectionné. $\r$\n$\r$\nIl est recommandé de fermer toutes les autres applications avant de commencer l'installation. Cela permet de mettre à jour les fichiers système pertinents sans devoir redémarrer votre ordinateur. $\r$\n$\r$\nClicer sur Suivant pour continuer."
tnteverett is offline   Reply With Quote
Old 4th August 2017, 18:40   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,588
What is the format of your .nsi file? You need to save in UTF-8 or UTF-16LE with BOM (Notepad just calls it Unicode).

If makensis -v4 displays something like "opening yourfile.nsi (ACP)" then it will not work, it must be Unicode.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th August 2017, 19:10   #3
tnteverett
Junior Member
 
Join Date: Jul 2017
Posts: 17
I suspected this so I changed my editor (Notepad++) to ANSI and it worked if I used "Unicode true" but then I found other error in function call return values. For example when I expected "603" I got "?3".
Notepad++ does not have "UTF-16LE" but it does have "UTF-8" but this is where I started and that was not working.
I am still confused, and still trying to resolve both issues now.
tnteverett is offline   Reply With Quote
Old 4th August 2017, 20:08   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,588
It needs to be UTF-8 with a BOM. Notepad++ calls "UTF-16 LE BOM" "UCS-2 LE BOM" (almost the same thing). If for whatever reason you cannot use a BOM then you must use "makensis /INPUTCHARSET UTF8 yourfile.nsi"

The final alternative is to replace non-ASCII characters in the .nsi with ${U+xxxx} but that is probably too much work for langstrings.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump