claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] German umlauts (ä, ö, ü) randomly replaced with ASCII substitutes (ae, oe, ue)

Open HookHM opened this issue 11 months ago • 32 comments

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

  1. Start a Claude Code session
  2. Write in German (e.g., "Erkläre mir diese Funktion")
  3. 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

HookHM avatar Dec 16 '25 07:12 HookHM

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/13939
  2. 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

github-actions[bot] avatar Dec 16 '25 07:12 github-actions[bot]

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.

HookHM avatar Dec 16 '25 07:12 HookHM

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.

github-actions[bot] avatar Jan 15 '26 10:01 github-actions[bot]

still occuring frequently

buffcode avatar Jan 19 '26 21:01 buffcode

Very often. The problem appeared overnight; it wasn't always there.

Kinzal16 avatar Jan 19 '26 21:01 Kinzal16

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

iBoarder avatar Jan 20 '26 21:01 iBoarder

The issue is getting progressively worse and should be fixed as soon as possible.​​​​​​​​​​​​​​​​

AdlerCentauri avatar Feb 03 '26 21:02 AdlerCentauri

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!

lukasfehling avatar Feb 04 '26 20:02 lukasfehling

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

LevelOne2k avatar Feb 05 '26 18:02 LevelOne2k

Happens for me as well, I found out:

The main conversation agent uses correct Unicode, only subagents are affected

gerhard-mueller avatar Feb 09 '26 01:02 gerhard-mueller

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.

rsiuda avatar Feb 11 '26 16:02 rsiuda

This problem is so annoying.

LevelOne2k avatar Feb 11 '26 17:02 LevelOne2k

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.

HookHM avatar Feb 15 '26 00:02 HookHM

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

AdlerCentauri avatar Feb 22 '26 21:02 AdlerCentauri

This issue is getting progressively worse day by day. When will someone from Anthropic finally address and fix this extremely annoying and frustrating bug?

Jur92 avatar Mar 05 '26 16:03 Jur92

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.

TheRealTremes avatar Mar 10 '26 16:03 TheRealTremes

● 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

......................-===---------.....................
..................=----............-----................
..............=+=+-:.:.:...............----.....:::.....
............=+*--:.:.:....................---....:--....
..........:-++-.:..............:::::::::::.----=..:-::..
..........=+=.:.............::-:::::::::::.:..:==..::::.
.........-+-:.:..........::::::::::-=--::::::.+:++..::-:
........-+=-:.:..........:::........---==+=...:=+++-:.-:
........+=-.:...:.......:::::::::::..-===++*#++-+#+===.-
........=+-.:......::-::::::.:---=-==.....-==+##***=.:--
.......===.:.:...::::::---======-=+++**+*###*#+**%#%--:-
.......=+=.:.:..::::::===-..--====-===#+++=..+**=#%%#--:
.......-+-.:....::::::::---=======.===++++++##*%%#%#%#=-
.......--=.:....:::::::::::=....===-====+++:+##%%@%%@+==
.......=-=-.......:::::::.......-.-----=****=*+...#%@%==
........-=---.........=.:-..-..:....-==+###*::::...*%%++
........-----......-=====--.........--=+%#%=:....=-=#%+#
.........-==-.....-..===-----......---=+#%#*=::..:+*%%#+
.........--==.........===+==+---..:---+++%+***==-#%%@%%+
...........==..:.......===+++##***++==+++%%=####%%%@@@@=
............=-.:........==+**####*++===++#%@#-##%%%@@@%=
............-=-:::...--.-==++###*+.==+++%%%%%-##%@@%%%+#
.............=-.::....--...=+***++.=++-:*#%%+##%%%%%++#%
.............--.:::....==.-++++*+.++++++**##%##%%%%*###%
.............=-.:::::..:==.++++++++****###%%%@%%%%%+%%%#
.............=-::::.::..:==++++*-..:+***#####%%@@@####%#
.............=-..::.::--..-++++++******###%%%%@@@@%%%%%#
............==-.:::--------.=++********####%%@%%@#%%#%%%
...........-=-::::---==-=+-+=.+*+***####%%@@%%%+#%%%@@@@
...........==-::::---====++++++.+*****##%####==**##%%@@@
..........===-:::..--====++++*+++*#:::---+=++++**##%%@%@
.........===--::.:---=====+++***+*++***#-==++++*#*%#%%%@
........===--..:-:---========++++*+:*+***======++#%#%%%%
.-=========-----::------=+======+++++++**#####%%%%%%@@@%

NubeBuster avatar Mar 28 '26 04:03 NubeBuster

Regarding the “platform:macos” label: This happens on Windows (11) too

schmik avatar Mar 31 '26 13:03 schmik

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.

msouga avatar Mar 31 '26 19:03 msouga

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:

  1. 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
  2. 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
  3. 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.

msouga avatar Mar 31 '26 20:03 msouga