Seems like a lot of code when all you need to do is this: #include <fileconstants.au3> Local $sSection = "section_αβγδεζηθ" Local $sKey = "key_ЖЗИЙЛЦЩ" FileClose(FileOpen("test.ini", $FO_UTF16_LE + $FO_OVERWRITE)) ; all the magic is done here IniWrite("test.ini", $sSection, $sKey, "value_ℂℍℕℙℚℝℤ") Local $sValue = IniRead("test.ini", $sSection, $sKey, "Failure") MsgBox(0, "", "Section = " & $sSection & @LF & "Key = " & $sKey & @LF & "Val