Delimiter can only be one character
Closed this issue · 3 comments
nocheinandreas commented
Hi!
I need a delimiter like |~| because the data inside the CSV could really contain all kind of characters. I cannot use just one character like | or ~.
I have seen in the code that the following is used:
delimiter := []rune(c.String("delimiter")) p.delimiter = delimiter[0]
So why not using the following?
delimiter := []rune(c.String("delimiter")) p.delimiter = delimiter
DeyV commented
Because delimiter must be rune, as is in csv.Reader.Comma
As always - you can use " or ' for quoting strings in csv
nocheinandreas commented
Surrounding with " or ' is difficult because the strings are containing " or ' as well. I will clean up the records beforehand, to provide something more valid.
DeyV commented
In csv file you can quote “ with \ or duble “
( “” )
W dniu czw., 7.12.2023 o 17:27 nocheinandreas ***@***.***>
napisał(a):
… Surrounding with " or ' is difficult because the strings are containing "
or ' as well. I will clean up the records beforehand, to provide something
more valid.
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACMCSUWPZ6VS2O75T45EMDYIHU6RAVCNFSM6AAAAABALAL2IKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBVGY2TENRYGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
Dane osobowe zawarte w treści korespondencji przetwarzane są na zasadach
opisanych *tutaj <https://mentax.pl/polityka-prywatnosci-e-mail/>*.