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/13 21:54:54 UTC

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

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

 ##########
 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:
   Out of interest why are you using the `utf-8-sig` encoding rather than `utf-8`?
   
   

----------------------------------------------------------------
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