-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wierd behaviour on backslashes in literals #165
Comments
Hi @mvanbrab ! Do you get the same behavior if the data is in JSON? |
Well no, but in equivalent JSON input I have to provide two backslashes where I mean one, so this is the input then and the output is OK (also contains the same amount of backslashes as the input), but that seems like a no-brainer to me...
|
Aha! That confirms my hypothesis: a few versions ago, we switched from Apache CSV to Open CSV to parse CSV files. |
It seems that this is a common problem: https://dzone.com/articles/properly-handling-backslashes-using-opencsv |
Tested the solution from dzone.com. |
Found on version 5.0.0 and 4.15.0:
Single backslashes are eaten, double backslashes are output as double backslashes, triple backslashes are output as double backslahes.
A testcase is provided in attached file.
Remark: version 4.12.0 always output twice the number of backslashes in the input.
issue.zip
The text was updated successfully, but these errors were encountered: