Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup Unicode encoding issue with messages in ISS script

We have a script setup to run with Inno Setup Unicode compiler. The installer at the moment supports English, German and French.

It has been brought to our attention that the encoding for our custom messages in French aren't correct. The custom message files are saved as UTF-8 so there should not have been an encoding issue. We verified we were using the Unicode compiler and not ANSI by accident.

image

Expected Custom message:

French.UninstallOldVersionPrompt=Il semble y avoir une version antérieure de Rubberduck installée sur ce système pour %s.There seems to be a previous version of Rubberduck, qui devra d'abord être désinstallée. Procéder à la désinstallation?

Link to source

The file is saved as UTF-8, so it shouldn't have had encoding issues. What went wrong?

For more details, you can read up on the Github issue

like image 817
this Avatar asked Apr 19 '18 13:04

this


1 Answers

The .iss file needs to have UTF-8 BOM, if it includes Unicode/UTF-8 strings.

In your case, it's the French.CustomMessages.iss that is missing the BOM.

The German.CustomMessages.iss has the BOM, that's why it works correctly with German.


The BOM requirement is indeed not documented. But I believe it's clear from the code of TTextFileReader.ReadLine.

like image 130
Martin Prikryl Avatar answered Sep 30 '22 20:09

Martin Prikryl