A bilingual proposal can contain perfect Chinese text yet download with an unreadable filename. Separate the file’s bytes from the server’s suggested save name. Ask the supplier for a safe ASCII fallback and an international filename rather than renaming the same file after every customer complaint.
Source-bound fact
Content-Disposition supports filename* encoding; supporting clients prefer it over filename when both exist. Official reference · Checked 17 October 2026.
Filled synthetic acceptance example
Synthetic teaching example, not a client case or a real-platform assessment. On narrow screens, scroll to read the complete table.
| Input | Check basis | Expected |
|---|---|---|
| ASCII fallbackproposal.pdf; UTF-8报价.pdf | international name | 报价.pdf intended |
| Browser does not support international field | fallback remains safe | proposal.pdf |
| Suggested path../报价.pdf | untrusted path input | reject path; do not use as storage path |
Supplier acceptance procedure
- Keep document identity and access permission separate from the visible filename.
- Record response header, language, browser and observed saved name for the same synthetic file.
- Test ASCII fallback, Chinese characters and rejected separators; never insert a customer-supplied path directly.
Interpret the output
The included encoding check proves a UTF-8 filename token round-trips, not that every browser chooses an identical name. The acceptance record must retain what each supported browser saved. This is different from a CSV payload encoding test: correctly decoded contents do not establish a correct download name.
Explicit limits
Not a complete header parser, path sanitizer, cross-origin download fix or document-authorisation implementation. No real customer files are used.
Replay the finite teaching model
Save both files in one folder and use Node22 or newer. JSON contains inputs and expected results. The script processes synthetic data only, with no network, credentials, payment or paid API calls. Passing is not evidence that a real integration passed acceptance.
Filled inputs and expectations · Inspectable teaching script
node check.mjs bilingual-download-filename-header.json