Needs review
Project:
Node import
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
26 May 2011 at 07:00 UTC
Updated:
26 May 2011 at 07:03 UTC
Jump to comment: Most recent file
While using text delimiters, escaped text delimiters are not handled correctly in some particular cases.
The problem happens since data is read from the csv in chunks of 1024 bytes. This can result in situations where the escape character has been read and the delimiter not. However the current code starts looking for escaped delimiters only in the newly read data and thus misses it. Sample data is attached. You can see the problem in the step 3 itself where all the fields are not correctly separated.
The same problem also occurs in some cases when field separator is multi-character.
Drupal: 6.19
PHP: 5.3.2
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | escaped-text-delimiter-multichar-fs-1169280-1.patch | 379 bytes | abhaga |
| error.txt | 1.25 KB | abhaga |
Comments
Comment #1
abhaga commentedThe issue can be solved by re-scanning the complete buffer whenever we read more data in. A patch is attached.