You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/03/14 02:40:26 UTC

[GitHub] [incubator-superset] zhaoyongjie commented on a change in pull request #7010: fix Gunicorn raise encoding error

zhaoyongjie commented on a change in pull request #7010: fix Gunicorn raise encoding error
URL: https://github.com/apache/incubator-superset/pull/7010#discussion_r265402243
 
 

 ##########
 File path: superset/views/base.py
 ##########
 @@ -320,7 +320,8 @@ class CsvResponse(Response):
     """
     Override Response to take into account csv encoding from config.py
     """
-    charset = conf.get('CSV_EXPORT').get('encoding', 'utf-8')
+    _charset = conf.get('CSV_EXPORT').get('encoding', 'utf-8')
+    charset = 'utf-8' if _charset.lower() == 'utf-8-sig' else _charset
 
 Review comment:
   utf-8-sig is utf-8 encoding with BOM, and this is microsoft Excel detect utf-8 encoding. 
   In this scenarios, if use Excel open to east asian charset by Excel,  excel show garbled.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org