File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ class CSVOptions(
202202 }
203203
204204 val lineSeparatorInRead : Option [Array [Byte ]] = lineSeparator.map { lineSep =>
205- lineSep.getBytes(" UTF-8 " )
205+ lineSep.getBytes(charset )
206206 }
207207 val lineSeparatorInWrite : Option [String ] = lineSeparator
208208
@@ -232,9 +232,9 @@ class CSVOptions(
232232 format.setDelimiter(delimiter)
233233 format.setQuote(quote)
234234 format.setQuoteEscape(escape)
235- lineSeparatorInRead .foreach {sep =>
236- format.setLineSeparator(sep.map(_.toChar) )
237- format.setNormalizedNewline(sep.head .toChar)
235+ lineSeparator .foreach {sep =>
236+ format.setLineSeparator(sep)
237+ format.setNormalizedNewline(0x00 .toChar)
238238 }
239239 charToEscapeQuoteEscaping.foreach(format.setCharToEscapeQuoteEscaping)
240240 format.setComment(comment)
You can’t perform that action at this time.
0 commit comments