Open rakeshgk opened 10 years ago
Yes, the parser fails for these type of inputs. Also, the parser should be able to recognize escape characters and parse them accordingly. This parser also doesn't do that.
Patches are welcome!
Thanks for the confirmation @psibi !!
Looks like this code returns the wrong value for the last column values.
Need to reverse the string.
It doesn't support UNICODE, like Chinese.
when there is only one column in the csv file, the csv_parser will crash.
You are just using a tokenized approach to split the line at commas and return the fields back and not follow the standards of CSV specified in the RFC - http://tools.ietf.org/html/rfc4180
I tested it for one of the valid cases that programs adhering to the RFC standard should support Input 1997,Ford,E350,"Super, luxurious truck"
When I ask for the 4th field to be returned Your program returns - "Super The actual returned value should be - Super, luxurious truck