Old 20th October 2012, 04:42   #1
stephench
Junior Member
 
Join Date: Aug 2004
Posts: 3
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?
stephench is offline   Reply With Quote
Old 20th October 2012, 11:07   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
ReadINIStr uses the GetPrivateProfileString API. Try encoding in full Unicode UTF-16 (without any BOM).

Stu
Afrow UK is offline   Reply With Quote
Old 20th October 2012, 16:54   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
Quote:
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th October 2012, 22:45   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Quote:
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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump