I have an Inno Setup installer that creates custom wizard pages using Pascal Script. The installer seems to be using the correct templates to support other languages. However, custom CreateCustomPage() pages created using CreateCustomPage() display garbage characters in them, not strings in the target language (which in this case is Russian).
Strings are stored in the [CustomMessages] section, using include files for each language. Although I'm new to Inno Setup, the lines seem to be set up in a way that is compatible with Inno Setup examples and with instructions that I read from various sources on the Internet.
In any case, the pages of custom wizards and the controls on them are created using code, for example:
Page := CreateCustomPage( PreviousPageId, ExpandConstant('{cm:MyStringConstant}'), ExpandConstant('{cm:MyOtherStringConstant}') );
Then in the line include file (again, for Russian) the lines are defined as:
[CustomMessages] ru.MyStringConstant=<Russian string> ru.MyOtherStringConstant=<Russian string>
But when the installer works, lines on the pages of custom wizards appear with garbage characters (as if UTF-8 characters are interpreted as Ansi), and not in the correct Russian text.
Other pages in the installer (i.e. those that are not created using CreateCustomPage() ) are displayed correctly.
So my question is: do I need to do something special when using ExpandConstant() with UTF-8 strings? Or is there a more efficient function to extract UTF-8 strings from the [CustomMessages] section?
piccy source share