Preflight Checklist
What's Wrong?
Tool affected: Write
Environment: Windows, ASP.NET project (Visual Studio 2026)
Issue: When using the Write tool to completely rewrite a file, UTF-8 BOM (Byte Order Mark) is not preserved. This causes accented characters to display incorrectly (e.g., "sécurisé" becomes "sécurisé").
Expected behavior: Write tool should detect and preserve the original file's encoding (including BOM) when overwriting.
What Should Happen?
This causes accented characters to display incorrectly (e.g., "sécurisé" becomes "sécurisé")
Error Messages/Logs
Steps to Reproduce
Reproduction:
- Have a file with UTF-8 BOM encoding containing accented characters (common in .ascx, .aspx, .cs files)
- Use Write tool to rewrite the entire file
- Accented characters are corrupted
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.61
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Windows Terminal
Additional Information
No response
Preflight Checklist
What's Wrong?
Tool affected: Write
Environment: Windows, ASP.NET project (Visual Studio 2026)
Issue: When using the Write tool to completely rewrite a file, UTF-8 BOM (Byte Order Mark) is not preserved. This causes accented characters to display incorrectly (e.g., "sécurisé" becomes "sécurisé").
Expected behavior: Write tool should detect and preserve the original file's encoding (including BOM) when overwriting.
What Should Happen?
This causes accented characters to display incorrectly (e.g., "sécurisé" becomes "sécurisé")
Error Messages/Logs
Steps to Reproduce
Reproduction:
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.61
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Windows Terminal
Additional Information
No response