cp850 is the name of an empty variable, which would probably be interpreted as "use the system default". You could probably omit the assignment entirely. If not, use "CP1252" including quotation marks.
Yes you are right, sorry for that mistake.
Anyway, what's your "solution" got to do with UTF-8?
I forgot to say that my file starts with :
A good working example will be better than a long explanation :
$data := "été"
file1 := fileOpen("uc.tmp", "w")
file1 := fileOpen("uc.tmp", "r")
file1.Encoding := "cp1252"
$data2 := file1.ReadLine()
IniWrite, %$data%, foo.ini, test, test
IniWrite, %$data2%, bar.ini, test, test
Run this and in foo.ini you find :
in bar.ini you find :
Which was the desired result.
I understand this should be done with StrPut / StrGet, but this was written before i understood that, and I didn't explore StrPut.