spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shixiong Zhu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-3922) A global UTF8 constant for Spark
Date Mon, 20 Oct 2014 05:21:34 GMT

    [ https://issues.apache.org/jira/browse/SPARK-3922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176615#comment-14176615
] 

Shixiong Zhu commented on SPARK-3922:
-------------------------------------

PR: https://github.com/apache/spark/pull/2781

> 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
>            Priority: Minor
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message