FIELD NOTES · ACCEPTANCE EXERCISES

A readable Chinese download name needs a header contract

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.

InputCheck basisExpected
ASCII fallbackproposal.pdf; UTF-8报价.pdfinternational name报价.pdf intended
Browser does not support international fieldfallback remains safeproposal.pdf
Suggested path../报价.pdfuntrusted path inputreject path; do not use as storage path

Supplier acceptance procedure

  1. Keep document identity and access permission separate from the visible filename.
  2. Record response header, language, browser and observed saved name for the same synthetic file.
  3. 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