[ https://issues.apache.org/jira/browse/SPARK-3922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reynold Xin resolved SPARK-3922. -------------------------------- Resolution: Fixed Fix Version/s: 1.2.0 Assignee: Shixiong Zhu > A global UTF8 constant for Spark > -------------------------------- > > Key: SPARK-3922 > URL: https://issues.apache.org/jira/browse/SPARK-3922 > Project: Spark > Issue Type: Improvement > Components: Spark Core > Reporter: Shixiong Zhu > Assignee: Shixiong Zhu > Priority: Minor > Fix For: 1.2.0 > > > A global UTF8 constant is very helpful to handle encoding problems when > converting between String and bytes. There are several solutions here: > 1. Add `val UTF_8 = Charset.forName("UTF-8")` to Utils.scala > 2. java.nio.charset.StandardCharsets.UTF_8 (require JDK7) > 3. io.netty.util.CharsetUtil.UTF_8 > 4. com.google.common.base.Charsets.UTF_8 > 5. org.apache.commons.lang.CharEncoding.UTF_8 > 6. org.apache.commons.lang3.CharEncoding.UTF_8 > IMO, I prefer option 1) because people can find it easily. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org