-
Notifications
You must be signed in to change notification settings - Fork 439
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
Lib does not work if cell contains \n characters #92
Comments
Hi I have the same problem. Cells with double quoted strings that contain
I have fixed this localy and it seems to be working.
This code does not consider other quote_policies. This needs to be done correctly. I'm using csv reader with double_qoute_escape policy like this:
and everything works for me. |
The issue with \n in quoted strings has been raised a lot in the past. This is known. The summary of the problems are:
Up to now I have not yet seen a good solution. |
We are processing many csv files downloaded from various webservices and/or generated by tools. The problem of runaway due to missing closing double-quote is not a problem of parser, it is problem of generator, this should not be corrected by the parser. Solving this by "correcting" csv before reading by escaping all multi-line records with some escape and then after reading unescape all escaped new lines is fairly inefficient and complicated. |
Muti-line cells are absolutely required for my use case. You cannot tell users that they can't put multiple lines in text boxes. |
Then you have to either escape new lines by replaceing them somehow, not
use CSV, or look for a different library.
…On 6/30/22 17:59, Exceter007 wrote:
Muti-line cells are absolutely required for my use case. You cannot
tell users that they can't put multiple lines in text boxes.
—
Reply to this email directly, view it on GitHub
<#92 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC3IBDZKP2LDVFHPJ4IRBCDVRW77ZANCNFSM4KMWN6KA>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello,
I have integrated your library into an application that I am working on and what I have found is that if a cell has text in it that is spread into multiple lines, then the application will crash. :(
Is there any hope for a fix?
A possible solution for this, that I have thought of is that, if a cell starts with a quote but it isn't found by the end of the line, then more lines should be read until the pair is found. I haven't managed to write a fix attempt yet, as I haven't looked into your code enough.
Kind regards,
Daniel
The text was updated successfully, but these errors were encountered: