mirror of
https://github.com/FourierTransformer/ftcsv.git
synced 2024-12-16 05:24:21 +00:00
Convert value to string before escape it
Originall ftcsv will be failed when encoding a number field content
This commit is contained in:
parent
174d0efe64
commit
93b9cc6a65
@ -323,6 +323,7 @@ end
|
|||||||
|
|
||||||
-- a function that delimits " to "", used by the writer
|
-- a function that delimits " to "", used by the writer
|
||||||
local function delimitField(field)
|
local function delimitField(field)
|
||||||
|
local field = tostring(field)
|
||||||
if field:find('"') then
|
if field:find('"') then
|
||||||
return field:gsub('"', '""')
|
return field:gsub('"', '""')
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user