From 2e0d8a628463cf8655e299e7222ab9902b78f5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=2E=20M=C3=BCnch?= Date: Thu, 20 Oct 2016 20:20:12 +0200 Subject: [PATCH] Delmiter was not taken into account for Headers Headers were always separated with "," char even when other delimiter was given. --- ftcsv.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftcsv.lua b/ftcsv.lua index b0ea1b9..6973447 100644 --- a/ftcsv.lua +++ b/ftcsv.lua @@ -442,7 +442,7 @@ function ftcsv.encode(inputTable, delimiter, options) newHeaders[i] = headers[i] end end - output[1] = '"' .. table.concat(newHeaders, '","') .. '"\r\n' + output[1] = '"' .. table.concat(newHeaders, '"' .. delimiter .. '"') .. '"\r\n' -- add each line by line. for i, line in writer(inputTable, delimiter, headers) do