please try the following code:
Code: Select all
hFile := FileOpen("temp.ini", "w-", "utf-8")
hFile.Write("[config]`ntemp=this is a test`n")
hFile.Close()
Msgbox FileExist("temp.ini")
Msgbox IniRead("temp.ini", "config", "temp")
You will get an error on the last line.
Now change the first line to this:
Code: Select all
hFile := FileOpen("temp.ini", "w-", "utf-8-raw")
IniRead only has problems with UTF-8-BOM files.