03.11.2020, 11:05
You can add UTF-8 byte order mark to your CSV like this:
Code:
bom = string.char(0xEF, 0xBB, 0xBF)
csv = bom .. table.concat(errorBuffer, '\r\n')
result, err = io.writefile ('/home/ftp/' .. errorFile, csv)