edit-tool-unicode-failure

Installation
SKILL.md

Edit Tool Unicode Failure Workaround

Problem

The Edit tool's old_string parameter fails to match text containing Unicode characters, even when the string appears identical in Read tool output. This causes silent failures with the error "String to replace not found in file."

Context / Trigger Conditions

  • Edit tool returns "String to replace not found in file"
  • The old_string visually matches what Read tool shows
  • File contains any of these Unicode characters:
    • Emojis: šŸš€ šŸ‘‹ šŸŽ® šŸ“ŗ šŸŒ etc. (multi-byte UTF-8 sequences, 4 bytes each)
    • Em-dashes: — (U+2014, bytes e2 80 94)
    • Non-breaking spaces: (U+00A0, bytes c2 a0) — invisible, looks like regular space
    • Curly/smart quotes: '' "" (U+2018/2019/201C/201D)
    • Other multi-byte Unicode: flags šŸ‡ØšŸ‡¦, variation selectors āœˆļø

Solution

Related skills
Installs
1
First Seen
Apr 16, 2026