SANJIESAN TOOLS / Text imports
Decoded text still needs a known-character check
A text import can produce a readable-looking string and still change an important name or punctuation mark. Before moving a real resource manifest between tools, keep a tiny known sample. The aim is to inspect the bytes-to-text boundary without assuming the decoder can recover content that was already lost upstream.
Know the expected text and encoding
Prepare a harmless sample with English, Chinese and a punctuation mark relevant to your workflow, then retain its expected text separately. MDN describes TextDecoder as converting bytes in a specified encoding to a JavaScript string. Record the encoding the source actually declares or documents instead of guessing from the filename. Keep an unknown declaration unknown until it can be checked. The existence of a string is not evidence that the original characters were represented correctly.
Compare the characters before mapping fields
Inspect the decoded sample against the expected names and punctuation. If something differs, keep the original bytes and decoding choice for investigation rather than saving the altered text over the source. Do not compensate for a corrupted name by silently changing the resource identifier. Character decoding, field parsing and identity matching are different stages. A defect at the first stage can become harder to find if later cleanup makes the wrong text look consistent.
Keep the small fixture with the route
Record the source tool, declared encoding, receiving tool and observed result for the actual sample. Repeat the focused comparison when that route changes, rather than rechecking every unrelated part of the project. A correct fixture does not verify every future file or factual claim in the manifest. No decoding code was executed for this article; it gives a concrete inspection method and preserves uncertainty when the source encoding or original content is not yet established.