when i try to read a file with:
local f = sys.File("C:\\Temp\\somefile.txt")
local content = f:read()
content is a Buffer object instead of a string.
Is this behaviour expected or its just me doing it wrong?
Welcome to the LuaRT Community.
Thank you for your report : as the documentation states, for UTF8 and UNICODE encoding, the File:read() method should return a string not a Buffer object.
This bug is related to BOM not being detected in the file and defaulting encoding to "binary" which is not the expected behaviour as the user provided the "utf8" encoding.
This bug will be fixed in the next release.