How does InnoSetup handle INI file encoding

Viewed 207

I have a regular entry in the [INI]-Section of InnoSetup script

e.g.

[INI]
Filename: "{app}\myinifile.ini"; Section: "MY_SECTION"; Key: "MY_KEY"; String: "value which contains a symbol (§) that is different between ascii and UTF-8 encoding: §" 

Now, on some systems if the INI file is created the paragraph symbol ("§") is handled as ascii which is expected and on other systems it's transformed to UTF-8.

In fact if I analyse the precise content of that files.

Normally I have: § => "47" (hex)
BUT on some systems SOMEHOW: § => "C2 47" (hex), which is the UTF-8 representation of "§"
but why this differences?

I thought Inno Setup uses the regular WritePrivateProfilString from the Win-API. I found this in the Win-Api:

The winbase.h header defines GetPrivateProfileString as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant.

BUT: how can I tell Inno Setup to use always the ANSI variant of it?

1 Answers
Related