CSV crash: "Quote located in unquoted token"
Dmitry
dmitry at indiedev.ru
Fri Oct 13 08:53:12 UTC 2017
Hi there.
When I load csv, it crashes ("Quote located in unquoted token")
on lines with quotes, like this:
ResourceNode_RemoveFromView_Confirm,You are about to remove
""{0}"" from view ""{1}"". Continue?,You are about to remove
""{0}"" from view ""{1}"". Continue?,,Resource Tree -
confirmation of removal from the current view
There are 5 records:
ResourceNode_RemoveFromView_Confirm,
You are about to remove ""{0}"" from view ""{1}"". Continue?,
You are about to remove ""{0}"" from view ""{1}"". Continue?,
,
Resource Tree - confirmation of removal from the current view
If I add quotes at begin and end of the 2 and 3 records, then it
works. But I can't change original file.
How I can avoid the error?
I read file using this code:
foreach(record;
file.byLine.joiner("\n").csvReader!(Tuple!(string, string,
string, string, string)))
{
...
}
More information about the Digitalmars-d-learn
mailing list