[BUG] German umlauts (ä, ö, ü) randomly replaced with ASCII substitutes (ae, oe, ue)
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 communicating in German, Claude Code inconsistently replaces German umlauts and special characters with their ASCII equivalents:
- ä → ae
- ö → oe
- ü → ue
- ß → ss
Examples:
- "für" written as "fuer"
- "können" written as "koennen"
- "löschen" written as "loeschen"
Expected behavior: Claude should consistently use proper Unicode umlauts (ä, ö, ü, ß) when writing in German.
Actual behavior: Umlauts are randomly replaced with ASCII substitutes. This happens inconsistently - sometimes within the same response, some words have correct umlauts while others use substitutes.
Reproducibility: Occurs frequently but inconsistently. No clear pattern identified for when umlauts are preserved vs. substituted.
Impact:
- Unprofessional appearance in documentation and code comments
- Inconsistent codebase when Claude generates German text
- Particularly problematic with proper names (e.g., author names in file headers)
Environment:
- Claude Code CLI v2.0.70 (Opus 4.5 · Claude Max)
- macOS 26.2
- Terminal: default macOS Terminal / iTerm2
- German language project with German documentation
Current workaround: Manual correction of all German text output.
This is a recent regression - started ~2-3 weeks ago. Umlauts worked perfectly before.
What Should Happen?
Claude should consistently use proper Unicode umlauts (ä, ö, ü, ß) when writing in German text, including:
- Chat responses
- Code comments
- Documentation
- Proper nouns and names (e.g., "Müller" not "Mueller")
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session
- Write in German (e.g., "Erkläre mir diese Funktion")
- Observe response - umlauts randomly replaced with ASCII (ä→ae, ö→oe, ü→ue, ß→ss)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
v2.0.70
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/13939
- https://github.com/anthropics/claude-code/issues/7335
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Not a duplicate. Related but different issue:
- #7335: Character corruption (→ �) when editing files on Windows
- #13939: Turkish UTF-8 corruption when editing files
- This issue: ASCII substitution (ä→ae) in chat responses on macOS
Different symptom (substitution vs corruption), different context (chat output vs file editing), likely different root cause.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
still occuring frequently
Very often. The problem appeared overnight; it wasn't always there.
Same issue here. Still happening frequently. What’s strange: sometimes Claude doesn’t even use ASCII substitutes anymore - it just drops the umlaut entirely. Example: “Verzogerung” instead of “Verzögerung” This is a recent regression, started a few
The issue is getting progressively worse and should be fixed as soon as possible.
This is getting worse - Claude is now even replacing existing occurrences of ü, ä, and ö with ue, ae, and oe, or simply substituting them with u, a, and o. Please fix this soon!
The issue is getting worse by the day. New symptoms:
1. Umlauts completely dropped (not even ASCII substitutes):
- "uber" instead of "über"
- "anderung" instead of "Änderung"
- "Verzogerung" instead of "Verzögerung"
2. Random language mixing in the same response:
- Starts in German: "Alle drei Findings hängen zusammen..."
- Switches to English mid-text: "Before I make changes, I need to understand..."
- Back to German: "Ich schaue mir zuerst das..."
Claude Code v2.1.31, Opus 4.5, macOS
Happens for me as well, I found out:
The main conversation agent uses correct Unicode, only subagents are affected
I see this behavior constantly with German language answers using Opus. Sonnet works as expected.
- Claude Desktop macOS, Opus 4.6 / Claude 1.1.2685 (f39a62)
- Claude.ai, Opus 4.6
- Claude Code v2.1.39 macOS, Opus 4.6
No matter if a simple text answer or sub-agents are used.
This problem is so annoying.
Beyond the visual and linguistic issues, ASCII replacements also waste tokens unnecessarily. Each replacement adds an extra character:
"ä" → "ae" (1 char → 2 chars) "ö" → "oe" (1 char → 2 chars) "ü" → "ue" (1 char → 2 chars) "ß" → "ss" (1 char → 2 chars)
In a typical German response, this can add up to dozens of extra characters, resulting in higher token usage for both input and output. This affects not only file writes but also chat responses, where hooks cannot intervene.
The issue is getting worse by the day. New symptoms:
1. Umlauts completely dropped (not even ASCII substitutes):
- "Losungsvorschlage" instead of "Lösungsvorschläge" (two umlauts missing in one word)
- "mochtest" instead of "möchtest"
- "fur" instead of "für"
- "uber" instead of "über"
- "anderung" instead of "Änderung"
2. Random language mixing in the same response:
- Starts in German: "Alle drei Findings hängen zusammen..."
- Switches to English mid-text: "Before I make changes, I need to understand..."
- Back to German: "Ich schaue mir zuerst das..."
This is becoming unusable for German-speaking users.
Claude Code v2.1.50, Opus 4.6, macOS
This issue is getting progressively worse day by day. When will someone from Anthropic finally address and fix this extremely annoying and frustrating bug?
This problem is absolutely unacceptable and Claude Code has become almost unusable because of it. It is getting worse every day — even when explicitly telling Claude Code to use umlauts, it only works for about 2 minutes before reverting back to ASCII substitutes. This must be fixed immediately.
● You're right, I was wrong — the file already exists without !. And the path is /home/mark/storagevids/ not /home/mark/mnt/storagebox-videos/. Let me try with the correct path:
● Bash(exiftool "/home/mark/storagevids/dlgui_downloads/Filename with I'M char as welll as perfectly legal !.mp4")
⎿ Error: Exit code 1
Error: File not found - ...
● Let me check what the Bash tool actually passes:
● Bash(echo -n "I'M" | xxd)
⎿ 00000000: 4927 4d I'M
● There it is. The Bash tool is converting U+2019 (e2 80 99) to ASCII ' (27) before passing it to the shell. That's the bug — Claude Code normalizes smart quotes to ASCII quotes in the command string.
So there's no way to pass U+2019 through the Bash tool at all. This confirms updating sanitize_filename to strip/replace these chars is the right fix.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
!
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
! for bash mode
......................-===---------.....................
..................=----............-----................
..............=+=+-:.:.:...............----.....:::.....
............=+*--:.:.:....................---....:--....
..........:-++-.:..............:::::::::::.----=..:-::..
..........=+=.:.............::-:::::::::::.:..:==..::::.
.........-+-:.:..........::::::::::-=--::::::.+:++..::-:
........-+=-:.:..........:::........---==+=...:=+++-:.-:
........+=-.:...:.......:::::::::::..-===++*#++-+#+===.-
........=+-.:......::-::::::.:---=-==.....-==+##***=.:--
.......===.:.:...::::::---======-=+++**+*###*#+**%#%--:-
.......=+=.:.:..::::::===-..--====-===#+++=..+**=#%%#--:
.......-+-.:....::::::::---=======.===++++++##*%%#%#%#=-
.......--=.:....:::::::::::=....===-====+++:+##%%@%%@+==
.......=-=-.......:::::::.......-.-----=****=*+...#%@%==
........-=---.........=.:-..-..:....-==+###*::::...*%%++
........-----......-=====--.........--=+%#%=:....=-=#%+#
.........-==-.....-..===-----......---=+#%#*=::..:+*%%#+
.........--==.........===+==+---..:---+++%+***==-#%%@%%+
...........==..:.......===+++##***++==+++%%=####%%%@@@@=
............=-.:........==+**####*++===++#%@#-##%%%@@@%=
............-=-:::...--.-==++###*+.==+++%%%%%-##%@@%%%+#
.............=-.::....--...=+***++.=++-:*#%%+##%%%%%++#%
.............--.:::....==.-++++*+.++++++**##%##%%%%*###%
.............=-.:::::..:==.++++++++****###%%%@%%%%%+%%%#
.............=-::::.::..:==++++*-..:+***#####%%@@@####%#
.............=-..::.::--..-++++++******###%%%%@@@@%%%%%#
............==-.:::--------.=++********####%%@%%@#%%#%%%
...........-=-::::---==-=+-+=.+*+***####%%@@%%%+#%%%@@@@
...........==-::::---====++++++.+*****##%####==**##%%@@@
..........===-:::..--====++++*+++*#:::---+=++++**##%%@%@
.........===--::.:---=====+++***+*++***#-==++++*#*%#%%%@
........===--..:-:---========++++*+:*+***======++#%#%%%%
.-=========-----::------=+======+++++++**#####%%%%%%@@@%
Regarding the “platform:macos” label: This happens on Windows (11) too
Adding the Spanish diacritics case to reinforce this is a cross-language issue, not specific to German.
Same bug, Spanish: Claude Code consistently strips tildes (á, é, í, ó, ú), eñes (ñ), and opening punctuation (¿, ¡) when generating large text blocks in Spanish — even when CLAUDE.md explicitly mandates correct Spanish orthography. The model generates correct output on a manual retry, confirming it can do it, but defaults to ASCII-safe output on the first pass.
Filed as #26128 (closed as stale/duplicate, linked here for reference).
Observed pattern across languages:
- Spanish: tildes and ñ stripped → "accion" instead of "acción", "diseno" instead of "diseño"
- German (this issue): umlauts replaced → "ae/oe/ue" instead of "ä/ö/ü"
- Root behavior is identical: non-ASCII characters in the U+00C0–U+024F range are substituted with ASCII equivalents under load (large outputs, long sessions)
Additional data point: The issue is significantly worse in long sessions. With context compression active, CLAUDE.md language instructions appear to be deprioritized, making the model revert to ASCII-safe output even mid-session after having written correctly earlier. See also #34779.
Impact: When generating documentation (~250–750 lines), the entire output has to be discarded and regenerated. For non-ASCII languages this is not a minor inconvenience — it doubles token consumption and makes Claude Code unreliable for professional writing in any language outside ASCII.
Follow-up to my previous comment: adding the full cross-language map and the root cause analysis that ties all of these together.
#32886 contains a detailed investigation of cli.js that identifies three structural causes for this entire class of bugs:
- The language instruction template generates a vague directive ("respond in de/es/pt-BR") with no mention of orthographic correctness or character fidelity — the model treats accent-free output as acceptable
- The CLAUDE.md wrapper injects "this context may or may not be relevant to your tasks" — this explicitly frames language rules as optional context, which the model deprioritizes during coding tasks
- The context compaction function summarizes conversation history without including language/locale instructions — so every long session degrades into ASCII-safe output regardless of user configuration
All open issues caused by the same structural failure:
| Issue | Language | Symptom |
|---|---|---|
| #32886 | Portuguese, French, Vietnamese, Czech, Spanish (any diacritics) | Language setting does not enforce diacritical marks |
| #14131 | German | ä/ö/ü/ß → ae/oe/ue/ss |
| #26128 | Spanish | á/é/í/ó/ú/ñ/¿/¡ stripped (closed as stale, unresolved) |
| #34779 | Spanish | CLAUDE.md language rules lost after context compaction |
| #15768 | Japanese | Panic: byte index not a char boundary |
| #14287 | Chinese | Panic: UTF-8 boundary crash (oncall) |
| #34134 | Arabic | RTL text rendered reversed |
| #17357 | Armenian | Script not generated at all |
| #34247 | CJK/Unicode | Mojibake on Windows |
The fix is documented in #32886. Three targeted changes to the language instruction template, the CLAUDE.md wrapper, and the compaction prompt. This is not a localization feature request — it is a correctness bug that makes Claude Code unreliable for the majority of users who do not write in English.