Created attachment 67324 [details] An example file containing a reduced test case. Problem description: Loading a CSV file that contains the field delimiter (ie: semicolon) within a text field (ie: double quotes) should ignore the field delimiter. It is placed within the text-delimiters to indicate it is part of the text string, and should therefor not be treated as a field delimiter. We found this bug when trying to load a CSV-export of a database table containing data stored in PHP's serialized data format. Steps to reproduce: 1. Create a CSV file with the following contents: "test";"\";\"";EOF 2. Load the file into Calc. Current behavior: File imported as follows (with pipes used to illustrate column separators). test|\|\""|EOF Expected behavior: File imported as follows (with pipes used to illustrate column separators). test|";"|EOF Platform (if different from the browser): Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
After testing it in Version 4.0.0.0.beta2 (Build ID: 4104d660979c57e1160b5135634f732918460a0) on Ubuntu 12.04 (x86) I think the problem has a different reason, namely that \" is not seen as an escaped quote, and hence interpreted as string delimiters. A CSV-file containing "test";";t";EOF gives test|;t|EOF as expected, so the semicolon inside the quotes is indeed interpreted as part of the string, and not as an separator. As I'm not aware of how CSV-import should handle escaped special characters, I'm unsure if this is a bug.
Changed Summary to reflect real issue in the report.
Confirmed error in LibreOffice Calc 4.0.1.2 Using menu Insert - Sheet From File... If you create with text editor the file with text: 1<TAB>"text with <NEWLINE ENTER> a newline character in text before close"<TAB>3 Save text, I have a newline into text field, the text field is with " Insert this file in calc and you will see that the <new line> into "..." change the row and break the text field. The error: A B C 1 1 text with 2 a newline character in text before close" 3 when the correct behaviour must be: A B C 1 1 text with 3 a newline character in text before close 2
In most other spreadsheets double quotes in .csv files are saved as "" http://en.wikipedia.org/wiki/Comma-separated_values (basic rules section) http://tools.ietf.org/html/rfc4180 (section 2.7) At the moment I can't see anyway to open up .csv files with values in double quotes. The only way I can think of is to convert them into unicode double quotes.
Adding self to CC if not already on
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.4 or later) https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT: - Update the version field - Reply via email (please reply directly on the bug tracker) - Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2016-01-17
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.2.5 or 5.3.0 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170306
*** Bug 118007 has been marked as a duplicate of this bug. ***
Dear Sander Bol, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
(In reply to Sander Bol from comment #0) > Created attachment 67324 [details] > An example file containing a reduced test case. > > Problem description: > Loading a CSV file that contains the field delimiter (ie: semicolon) within > a text field (ie: double quotes) should ignore the field delimiter. It is > placed within the text-delimiters to indicate it is part of the text string, > and should therefore not be treated as a field delimiter. > I confirm that this bug is still present in LO 6.3.2.2. Perhaps the whole module should be reviewed in order to take into consideration https://www.rfc-editor.org/info/rfc4180 This would solve some of the comments here.
This is not a bug. The file content "test";"\";\"";EOF with field separator ';' and quote character (text delimiter) '"' is *correctly* imported as test|\|\""|EOF The first \" is *not* an escaped double quote, CSV does not escape quotes by backslash but by doubling them, it is a \ backslash enclosed in double quotes. The third field with \"" is malformed because it contains a (meant to be escaped by doubling it?) double quote but is not quoted with double quotes. Calc tries to import it nevertheless and keeps all data encountered. Whatever produced that content is a broken generator.
I'm having the same problem when I tried to parse .csv data for a script for my company. It took me a entire day to figure out what was happening, then I import the same workbook from a windows computer and everything worked as expected.
Thank you for your fascinating subject. Duck Life is an adventure game in which ducks go on exciting adventures.link game: https://ducklife.online
Again, in CSV \" is *not* an escapement for an embedded quote character. Read https://www.rfc-editor.org/rfc/rfc4180