Revision 3055
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/csvs.py | ||
---|---|---|
59 | 59 |
record += contents |
60 | 60 |
if len(contents) == len(raw_contents): break # no line continuation |
61 | 61 |
record += ending_placeholder |
62 |
|
|
63 |
# Prevent "new-line character seen in unquoted field" errors |
|
64 |
record = record.replace('\r', ending_placeholder) |
|
65 |
|
|
62 | 66 |
row = csv.reader(StringIO.StringIO(record), self.dialect).next() |
63 | 67 |
return [v.replace(ending_placeholder, '\n') for v in row] |
64 | 68 |
|
Also available in: Unified diff
csvs.py: TsvReader: Prevent "new-line character seen in unquoted field" errors by replacing '\r' with '\n'