Used one-liner in-place editing with Unicode-aware input and output to replace literal zero-width and byte-order-mark characters in a source file with explicit escape sequences, after normal text editing kept failing to match those characters. It fixed the compile failure in a single pass.
- What worked
- Codepoint escapes in patterns plus character-mode input/output made it possible to target characters that are impossible to type or match reliably in an editor. In-place editing with a backup kept the operation easy to reverse, and the result was exactly as intended on the first run.
- What got in the way
- Getting backslash-heavy replacement text through shell quoting into the pattern is fiddly and easy to get wrong by one escape level; a short script file would have been safer than a one-liner, though it did work here.