You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Frun1na (via GitHub)" <gi...@apache.org> on 2026/09/21 10:38:42 UTC
[I] [Bug] CSV exports lack a UTF-8 BOM, so Excel garbles every non-ASCII cell [rocketmq-dashboard]
Frun1na opened a new issue, #4744:
URL: https://github.com/apache/rocketmq-dashboard/issues/4744
### Before Creating the Bug Report
- [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) and found no similar issue.
### What Happened
Every CSV export built in the frontend downloads a file that Excel cannot decode correctly: the Blob
is tagged `text/csv;charset=utf-8`, but Excel sniffs the encoding and, without a BOM, falls back to
ANSI/GBK. With a non-English UI (or any non-ASCII data: topic remarks, user-defined alert names,
localized status labels), every cell containing Chinese text turns into mojibake the moment the file
is opened in Excel.
The single chokepoint is `downloadCsv` in `web/src/utils/download.ts`; the topic, consumer group,
DLQ, client connection, metrics, topic-comparison and user exports all go through it.
For comparison, the server-side CSV exporters already handle this: `AuditService` and
`CloudCredentialService` prefix their CSV with `\uFEFF` — the frontend was missing the other half.
### Expected Behavior
Exported CSV files carry a UTF-8 BOM, so Excel (and other sniffs-the-encoding apps) render the
content correctly, in every UI language.
### Steps to Reproduce
1. Switch the UI to 中文, open the Topic page (or consumer groups / DLQ / clients / settings).
2. Click 导出 and open the downloaded `.csv` in Excel on Windows.
3. Every non-ASCII cell shows mojibake; a hex dump of the file shows no `EF BB BF` prefix.
### Environment
- RocketMQ Studio `rocketmq-studio` @ `7ce9a682`
- Frontend: `web/src/utils/download.ts` (`downloadCsv`)
- Excel on Windows (encoding sniffing behaviour)
### Are You Willing to Submit a Pull Request?
Yes — #4743 fixes this.
--
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CSV exports lack a UTF-8 BOM, so Excel garbles every non-ASCII cell [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #4744: [Bug] CSV exports lack a UTF-8 BOM, so Excel garbles every non-ASCII cell
URL: https://github.com/apache/rocketmq-dashboard/issues/4744
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CSV exports lack a UTF-8 BOM, so Excel garbles every non-ASCII cell [rocketmq-dashboard]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #4744:
URL: https://github.com/apache/rocketmq-dashboard/issues/4744#issuecomment-5760928553
**Issue Evaluation**
Category: `bug` | Status: **Confirmed**
The reported issue has been verified against the current codebase.
**Root Cause:** `downloadCsv` in `web/src/utils/download.ts` creates a Blob with `text/csv;charset=utf-8` but does not prepend the UTF-8 BOM (`\uFEFF`). Excel and other encoding-sniffing applications fall back to ANSI/GBK when no BOM is present, causing all non-ASCII cells (Chinese topic names, alert labels, etc.) to render as mojibake.
**Impact:** All CSV exports (topic, consumer group, DLQ, client connections, metrics, topic-comparison, user exports) produce unreadable files in Excel when the UI contains non-ASCII text.
**Severity:** Medium — data is not lost, but exports are unusable for non-English users without manual re-encoding.
**Note:** The server-side exporters (`AuditService`, `CloudCredentialService`) already handle this correctly with `\uFEFF` prefix. The fix is a one-line addition to the frontend `downloadCsv` function.
PR #4743 from the author addresses this. Maintainers may proceed with reviewing that PR directly.
---
*Automated evaluation by github-manager-bot*
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CSV exports lack a UTF-8 BOM, so Excel garbles every non-ASCII cell [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #4744:
URL: https://github.com/apache/rocketmq-dashboard/issues/4744#issuecomment-5761054435
Resolved by #4743 (merged into rocketmq-studio as 4c697f07a).
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org