Hi,
Thanks for the suggestions.
Classes like TStrings are meant to be simple wrappers around VCL
classes. They don't offer all functions, but also don't introduce
new ones.
TStrings.SaveToFile has an Encoding parameter in VCL, but via an
overload, and overloads are not supported by our scripting engine at
the moment. Nor are default values to fake an overload like this
one. The lack of those is a bit annoying because it makes it hard to
add new parameters to anything, might look into getting support for
either at some point.
TStrings.ToArray does not exist in VCL, but there is a
TStrings.ToStringArray. Should be doable, perhaps might need work to
support TArray<String> as the return value when wrapping.
UTF-8 encoding is not allowed for .ini files in Windows, so the file
you're talking about is not actually an .ini file. You must use
UTF-16LE with BOM instead, and then it should work. Such an encoding
must be set up manually, because, as documented by Microsoft, the
built-in functions of Windows won't do this for you. It might work
without a BOM as well, they use IsTextUnicode to detect apparently.
Greetings,
Martijn
Op 2-8-2026 om 13:25 schreef 'Zoë
Peterson' via innosetup: