Description
After uploading a Markdown file containing Chinese text, opening it (via /api/files/{id}/content) shows the Chinese characters as garbled mojibake.
Steps to Reproduce
- Sign in to the QM Web UI (dev mode)
- Upload a Markdown file containing Chinese text, e.g. content
# 标题\n这是中文测试
- Click the file to open
/api/files/{id}/content in the browser
- Observe that the Chinese characters render as mojibake (e.g.
æ ‡é¢˜)
Expected Behavior
Chinese content should render correctly as UTF-8 text.
Actual Behavior
Chinese text is displayed as garbled mojibake.
Environment
- QM version: main branch (commit
0f0e0ad)
- Deployment: local, Web UI dev (cookie-auth) mode
- Browser: Chrome
- Node: v24
Notes
• The filename is already correctly UTF-8 encoded via filename*=UTF-8''..., confirming the file itself is stored as UTF-8
• The issue is the missing charset declaration in the response Content-Type header
Description
After uploading a Markdown file containing Chinese text, opening it (via
/api/files/{id}/content) shows the Chinese characters as garbled mojibake.Steps to Reproduce
# 标题\n这是中文测试/api/files/{id}/contentin the browseræ ‡é¢˜)Expected Behavior
Chinese content should render correctly as UTF-8 text.
Actual Behavior
Chinese text is displayed as garbled mojibake.
Environment
0f0e0ad)Notes
• The filename is already correctly UTF-8 encoded via filename*=UTF-8''..., confirming the file itself is stored as UTF-8
• The issue is the missing charset declaration in the response Content-Type header