[BUG] Claude Code corrupts accented characters (ISO-8859-1 encoding issue)

Resolved 💬 15 comments Opened Oct 31, 2025 by lucas3g Closed May 10, 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 Claude Code edits files containing accented Portuguese characters (such as ç, ã, é, í, etc.), it corrupts them, replacing those characters with strange symbols like “�”.
This happens even when the file is saved in ISO-8859-1 encoding.

Example:

//Centraliza o botão dentro do panel

becomes:

//Centraliza o bot�o dentro do panel

The problem affects the entire file — not only the modified sections.

<img width="331" height="27" alt="Image" src="https://github.com/user-attachments/assets/25cb8f6b-eaf1-4f96-91d6-c144e1e6e01e" />

What Should Happen?

Claude Code should preserve ISO-8859-1 encoding and keep all accented characters intact after editing the file.

Error Messages/Logs

Steps to Reproduce

Create a file test.pas (or .py, .js, etc.) with the following content:

//Centraliza o botão dentro do panel
procedure Teste();
begin
ShowMessage('Ação executada com sucesso!');
end;

Run any Claude Code command that modifies the file, for example:

claude "add explanatory comments to the code"

Check the result in your editor — accented characters appear corrupted like “�”.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.28

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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