[BUG] The Edit tool changes file charset when editing .properties files, corrupting non-ASCII characters (Latin-1 encoded files get re-saved in UTF-8, causing character corruption)

Resolved 💬 3 comments Opened Mar 15, 2026 by molekola-io Closed Apr 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When editing the properties file, has been changed the encoding from UTF-8 to ISO-8859-1.

This is what claude reported to me in italian, after I debugged and found the issue:

    È un bug del tool Edit di Claude Code. Quando ho usato Edit per inserire le due righe nel file .properties, il tool ha riscritto il file con un encoding diverso dall'originale. Il file era salvato in ISO-8859-1 (il charset standard per i file .properties Java), dove è è il byte 0xE8. Il tool ha riscritto il file in UTF-8 (o ha fatto una conversione sbagliata), e 0xE8 in Latin-1 letto come UTF-8 parziale è diventato il carattere di replacement U+FFFD — che 
    in Latin-1 si visualizza come � (bytes EF BF BD).   

What Should Happen?

When claude code rewrite the file to add something, it has to preserve the original encoding unless differently specified

Error Messages/Logs

Steps to Reproduce

Please load this caption from properties

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗