yayunn opened a new pull request, #37245: URL: https://github.com/apache/superset/pull/37245
## Summary This PR fixes an issue where CSV attachments generated by Reports are missing the UTF-8 BOM, even when `CSV_EXPORT.encoding` is set to `utf-8-sig`. This causes non-ASCII characters (e.g. CJK) to appear garbled in Excel and some email clients. ## Problem - SQL Lab CSV exports correctly include the BOM - Report email CSV attachments do not include the BOM - This leads to inconsistent behavior between export paths ## Solution - Ensure that CSV bytes returned by the Reports execution pipeline contain a UTF-8 BOM when `CSV_EXPORT.encoding` is `utf-8-sig` - Avoid double BOM - Scope the fix only to Reports export path ## Screenshots / Logs Before: - CSV bytes start with: `e5 94 ae ...` (no BOM) After: - CSV bytes start with: `ef bb bf e5 94 ae ...` (correct UTF-8 BOM) ## Checklist - [x] Code compiles - [x] Fix is scoped to Reports only -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
