Github user jbax commented on the pull request:
https://github.com/apache/spark/pull/12818#issuecomment-216738292
I just read the rest of this ticket. Be careful with the
`setLineSeparator()`. It uses the default OS line separator but that's not
always desired.
By default, this is used to transform the `normalizedLineSeparator` when
writing. If you are running on Windows this will be:
```
normalizedLineSeparator = '\n'
lineSeparator = '\r\n'
```
Then write a value such as `"my \n multi line \n value"`
You will end up with `"my \r\n multi line \r\n value"`
If you actually want to have `"my \n multi line \n value"` you must either:
- set the line separator explicitly to `\n`
- set `normalizeLineEndingsWithinQuotes` to `false`, so whatever is in the
input will be written to the output, without any line ending transformation.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]