Prevent Mojibake on Mac: Stop Saving When Characters Cannot Be Converted

A conversion gate detects one incompatible character token and blocks unsafe saving before the protected source

When a Mac text editor shows a red warning for an unconvertible character, stop the save action. Do not overwrite the source. Keep an isolated copy, list the unresolved locations currently visible, and hand that pair to the verification owner.

This article ends at safe handoff. It does not claim that autosave stopped, that the file on disk remained unchanged, that every issue was corrected, that the unresolved count reached zero, or that a clean manuscript was produced.

Begin with an isolated copy, not the source

Do not begin an encoding check on the source file. Record the source filename, SHA-256, and declared encoding when known, then create one isolated copy in a separate folder. Open only that copy in the text editor.

Item Handling
Source keep unopened and unmodified in its received state
Isolated copy use only to identify warning locations
Unresolved list record the warnings for the verification owner

Record the source and copy hashes when the copy is created. They identify the starting revision. They do not prove a successful later save or measured autosave blocking.

Stop the save action when the warning appears

When the isolated copy shows an unconvertible-character warning, stop Save, Save As, or any option that continues past the warning. Do not choose a replacement immediately or switch encodings merely to make the warning disappear.

Here, “stop saving” is a human operating decision. It is not a measured claim that the application’s autosave stopped or that on-disk values remained unchanged. Record only the observed warning and the save action that the operator cancelled.

List the unresolved locations currently visible

Give the verification owner enough context to return to each warning:

Field Record
Location chapter, paragraph, line, and short surrounding text
Original the warned character without modification
Unicode code point U+XXXX when known
Target encoding the exact name visible or declared
Warning state visible / location unclear / unverified
Next check encoding, meaning, or reproduction

This is an initial-warning handoff, not a correction ledger. Do not add proposed replacements, approvers, resolved counts, a zero-result signature, or save-release approval. Preserve the original character for verification.

Hand off the copy and list as one package

The package contains source identity, the isolated copy, and the unresolved list. Give the copy a name that marks it as test material and do not move it back over the source. The verification owner can then inspect encoding, locations, and reproduction conditions in a dedicated environment.

At handoff, also record when and by whom the copy was made, together with identifiers that distinguish the source from the isolated copy. If the verification owner needs to modify the isolated copy, preserve the received version as the baseline and work on another copy. This keeps verification changes from being written back to either the source or the received baseline. A warning screenshot alone cannot identify the exact file version, so treat the filename and SHA-256 as part of the list’s identity record.

The person who saw the warning stops after making this package. That person does not decide meaning, rescan the full manuscript, approve every row, prove zero unresolved items, or create a clean output.

Keep Rune Studio evidence at the code boundary

Current Rune Studio code implements detection of ranges that cannot be represented in the selected encoding and applies a background highlight to those ranges. It also contains a conditional branch that avoids entering the autosave write path when unresolved ranges exist.

That is Stage 2 code evidence. It is not a measured warning result for this isolated copy, an observed autosave event, or proof that the file on disk remained unchanged. The workflow in this article therefore does not rely on that branch succeeding. It begins with the operator cancelling the save action after seeing a warning.

Leave zero resolution and clean output to the next workflow

STUDIO-098 owns the whole-manuscript workflow: manage all findings, obtain human approval for replacement wording, repeat the scan to zero, and hand off a separately named clean manuscript. This article does not repeat that work.

Its endpoint is narrower: the operator stopped saving, preserved the source, and handed an isolated copy plus the initial unresolved list to verification. The list is an intake record, not a completed correction ledger.

Prevent expansion of the accident and hand it off

The first action is not to clear the warning. Stop the save action, leave the source untouched, and prepare the isolated copy and warning-location list. This keeps unverified product behavior from becoming the only protection for the source.

Close with “isolated and handed off.” Autosave blocking, on-disk invariance, full correction, a zero result, and clean output each need separate evidence. Treat the warning as a signal to stop, not as proof that the file is already safe.