[BUG] Edit on window-1252 source files drops german umlauts

Resolved 💬 3 comments Opened Oct 6, 2025 by marcmuel Closed Oct 10, 2025

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?

I have a java project with Cp1252 encoded source files. After every edit, even small edits, every german umlaut in the comments is destroyed. I instructed CC to respect the windwos-1252 encoding when editing files. But that dosn't help.

What Should Happen?

I don't know the insights but when editing files it's essential to respect the encoding. Not every line of Code is written in UTF-8.

Error Messages/Logs

Steps to Reproduce

Create a java class encoded as windows-1252 with some german umlauts. For example:

public final class Umlauts {
/**

  • Das ist ein deutsches Program zur unterstützung abschätzung des jährlichen Verbrauchs von
  • Bier und Wurst.

*/
public static void main(String... args) {
System.out.println( "Bier ...");
}
}

Tell CC "check the file @src\Umlauts.java. please output some funfacts about germany in the main method."

The Result is:
public final class Umlauts {
/**

  • Das ist ein deutsches Program zur unterst�tzung absch�tzung des j�hrlichen Verbrauchs von
  • Bier und Wurst.

*/
public static void main(String... args) {
System.out.println("=== Fun Facts about Germany ===");
System.out.println("1. Germany has over 1,500 different types of beer");
System.out.println("2. There are over 300 different types of bread in Germany");
System.out.println("3. The first printed book was the Gutenberg Bible in 1450s");
System.out.println("4. Germany has more than 25,000 castles");
System.out.println("5. The Christmas tree tradition originated in Germany");
System.out.println("6. Albert Einstein was born in Germany");
System.out.println("7. Germany is the largest economy in Europe");
System.out.println("8. The Autobahn has no general speed limit in many sections");
}
}

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.8 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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