Skip to content
⌘ NSIS Forum Archive

ReadIniStr doesn't read UTF8 file correctly.

4 posts

stephench#

ReadIniStr doesn't read UTF8 file correctly.

I have a ini file in UTF8 format with BOM. I am using the unicode version of nsis. But the ReadIniStr function doesn't seem to read the ini file correctly. What can I do to solve this issue?
Afrow UK#
ReadINIStr uses the GetPrivateProfileString API. Try encoding in full Unicode UTF-16 (without any BOM).

Stu
Anders#
Originally Posted by Afrow UK View Post
ReadINIStr uses the GetPrivateProfileString API. Try encoding in full Unicode UTF-16 (without any BOM).

Stu
...with UTF-16 BOM
Afrow UK#
Originally Posted by Anders View Post
...with UTF-16 BOM
Actually I'm pretty sure it will miss the first section if you use a BOM unless you insert a blank line at the top.

Stu