[ https://issues.apache.org/jira/browse/SPARK-32289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156472#comment-17156472 ]
Yuming Wang edited comment on SPARK-32289 at 7/13/20, 4:01 AM: --------------------------------------------------------------- It seem we need to write UTF-8 BOM to csv file: https://stackoverflow.com/questions/32072017/write-utf-8-bom-with-supercsv https://www.zhihu.com/question/21869078 https://www.jianshu.com/p/39d481fac883 was (Author: q79969786): It seem we need to write UTF-8 BOM with supercsv: https://stackoverflow.com/questions/32072017/write-utf-8-bom-with-supercsv https://www.zhihu.com/question/21869078 https://www.jianshu.com/p/39d481fac883 > Chinese characters are garbled when opening csv files with Excel > ---------------------------------------------------------------- > > Key: SPARK-32289 > URL: https://issues.apache.org/jira/browse/SPARK-32289 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.1.0 > Reporter: Yuming Wang > Priority: Major > Attachments: garbled.png > > > How to reproduce this issue: > {code:scala} > spark.sql("SELECT '我爱中文' AS chinese").write.option("header", > "true").csv("/tmp/spark/csv") > {code} > !garbled.png! -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org