Skip to content

Commit

Permalink
SerDeUtil must use ISO-8859-1 actually
Browse files Browse the repository at this point in the history
  • Loading branch information
srowen committed Mar 15, 2016
1 parent d7c8cc6 commit b01b21c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ private[spark] object SerDeUtil extends Logging {
construct(args ++ Array(""))
} else if (args.length == 2 && args(1).isInstanceOf[String]) {
val typecode = args(0).asInstanceOf[String].charAt(0)
val data: Array[Byte] = args(1).asInstanceOf[String].getBytes(StandardCharsets.UTF_8)
// This must be ISO 8859-1 / Latin 1, not UTF-8, to interoperate correctly
val data = args(1).asInstanceOf[String].getBytes(StandardCharsets.ISO_8859_1)
construct(typecode, machineCodes(typecode), data)
} else {
super.construct(args)
Expand Down

0 comments on commit b01b21c

Please sign in to comment.