FIELD NOTES · ACCEPTANCE EXERCISES

A Chinese export must survive the agreed encoding round trip

An export can contain the right rows and still corrupt the text when opened with the wrong decoding assumption. Agree the file encoding and the receiving application’s import procedure. Renaming a file to CSV or changing its font does not repair bytes decoded with the wrong character set.

Who should use this acceptance brief

Businesses handing catalogue exports to bilingual staff. Use this as a scoped website handover task. Where real system evidence is required, teaching examples are not a substitute.

Source-bound platform fact

TextDecoder decodes byte sequences using a specified encoding, and fatal mode can reject malformed input. A successful UTF-8 decode does not prove the chosen application imported every field correctly. MDN: TextDecoder · Checked 16 October 2026.

Filled teaching example

Synthetic example, not a client case. Finite inputs, expected decisions and counterexamples follow; no live integration is claimed.

On narrow screens, scroll to read the complete table.

Input / caseCheck basisExpected decision
UTF-8 bytes of 中文strict UTF-8中文
malformed sequence C3 28fatal decodereject
valid text round tripapplication not checkedseparate import test

Run the acceptance exercise

  1. Specify UTF-8 or the approved alternative and retain a small known multilingual string.
  2. Decode strictly, compare text, then use the actual receiving application’s documented import path.
  3. Re-export a permitted test subset and compare character and field boundaries.

Interpret the result and retain evidence

The example contains byte arrays, not a spreadsheet or customer export. The checker proves a finite decoder result only. BOM handling, delimiters, quoted line breaks and formula interpretation remain separate acceptance items. Preserve the original bytes before attempting recovery; repeatedly saving garbled text can destroy useful evidence.

Limits before implementation

No Excel automation, real CSV rewrite or customer-data upload. Excludes complete spreadsheet safety and guessed encoding recovery.

Replay the finite example

Save both files in one folder and run with Node22.13 or newer. The example sends no network requests and changes no account or site. Filled inputs and expected outputs · Inspectable functions

node decision-check.mjs bilingual-export-utf8-evidence.json