Unicode Inno Setup
Beginning with Inno Setup 5.3.0, there are two versions of Inno Setup available: Non Unicode Inno Setup and Unicode Inno Setup.
Key features of Unicode Inno Setup are its ability to display any language on any system regardless of the system code page, and its ability to work with Unicode filenames. One could consider Unicode Inno Setup as the new standard Inno Setup and Non Unicode Inno Setup as an old special Inno Setup for those who want the very smallest size possible.
If you don't remember which version you installed, click the "Inno Setup Compiler" shortcut created in the Start Menu. If the version number displayed in its title bar says "(a)" you are running Non Unicode Inno Setup. If it says "(u)" you are running Unicode Inno Setup.
For the most part the two versions are used identically, and any differences between them are noted throughout the help file. However, the following overview lists the primary differences:
- Unicode Inno Setup uses the existing ANSI .isl language files and you should not and may not convert these to Unicode or anything similar since it does so automatically during compilation using the LanguageCodePage setting of the language. However, you do need to convert existing [Messages] and [CustomMessages] entries in your .iss files to Unicode if the language used a special LanguageCodePage.
- The automatic conversion is also done for any language specific plain text ANSI LicenseFile, InfoBeforeFile, or InfoAfterFile used so you should not convert these either (but you may do so if you wish anyway, unlike ANSI .isl language files).
- The [Setup] directive ShowUndisplayableLanguages is ignored by Unicode Inno Setup.
- Unicode Inno Setup is compiled with Delphi 2009 instead of Delphi 2 and 3, leading to slightly larger files. The source code however is still compatible with Delphi 2 and 3, and a non Unicode version will remain available.
- Existing installations of your programs done by non Unicode installers can be freely updated by Unicode installers, and vice versa.
- Unicode Pascal Scripting notes:
- The Unicode compiler sees type 'String' as a Unicode string, and 'Char' as a Unicode character. Its 'AnsiString' type hasn't changed and still is an ANSI string. Its 'PChar' type has been renamed to 'PAnsiChar'.
- The Unicode compiler is more strict about correct ';' usage: it no longer accepts certain missing ';' characters.
- The new RemObjects PascalScript version used by the Unicode compiler supports Unicode, but not for its input source. This means it does use Unicode string types as said, but any literal Unicode characters in the script will be converted to ANSI. This doesn't mean you can't display Unicode strings: you can for example instead use encoded Unicode characters to build Unicode strings (like S := #$0100 + #$0101 + 'Aa';), or load the string from a file using LoadStringsFromFile, or use a {cm:...} constant.
- Some support functions had their prototype changed: some parameters of CreateOutputMsgMemoPage, RegQueryBinaryValue, RegWriteBinaryValue, OemToCharBuff, CharToOemBuff, LoadStringFromfile, SaveStringToFile, and GetMD5OfString are of type AnsiString now instead of String.
- Added new SaveStringsToUTF8File, and GetMD5OfUnicodeString support functions.
- Added new 'Int64' type, supported by IntToStr. Also added new StrToInt64, StrToInt64Def, and GetSpaceOnDisk64 support functions.
- Added new TStringStream class.
- If you want to compile an existing script that imports ANSI Windows API calls with the Unicode compiler, either upgrade to the 'W' Unicode API call or change the parameters from 'String' or 'PChar' to 'AnsiString'. The 'AnsiString' approach will make your [Code] compatible with both the Unicode and the non Unicode version.
- Unicode Inno Setup supports UTF-8 encoded .iss files (but not UTF-16).
- Unicode Inno Setup supports UTF-8 and UTF-16LE encoded .txt files for LicenseFile, InfoBeforeFile, and InfoAfterFile.
Note: Unicode Inno Setup can only create Unicode installers and like wise the non Unicode version can only create non Unicode installers. If you want to be able to create both Unicode and non Unicode installers on one computer, you have to install both versions of Inno Setup into different folders.