Ticket #4452 (closed defect: fixed)
OGR CSV mangles non-platform newlines in data
| Reported by: | cdestigter | Owned by: | rcoup |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | OGR_SF | Version: | 1.9.0 |
| Severity: | normal | Keywords: | CSV |
| Cc: |
Description
When writing a CSV using OGR, newlines in data get converted to local newlines.
i.e. on linux, if I write this data to a field, I get a linux newline:
feature.SetField?("testfield", "line one\r\nline two")
This is independent of the value of the LINEFORMAT config flag.
Expected behavior: I'd expect the data to be unchanged. If I write a \r\n I expect it to show up in the CSV file. It shouldn't be affected by LINEFORMAT, but it certainly shouldn't get localised.
Change History
Note: See
TracTickets for help on using
tickets.
