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_stringvisually 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 โ๏ธ