Crash when displaying diff containing Korean (Hangul) characters

Resolved 💬 3 comments Opened Dec 29, 2025 by yby1749-svg Closed Jan 1, 2026

Description

Claude Code crashes with a Rust panic when trying to display a diff that contains Korean (Hangul) characters.

Error Message

thread '<unnamed>' (1060112) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 12 is not a char boundary; it is inside '액' (bytes 10..13) of `예상 잔액</Text>`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting
zsh: abort      claude

Steps to Reproduce

  1. Edit a file that contains Korean text (e.g., 예상 잔액</Text>)
  2. Claude Code attempts to display the diff
  3. The CLI crashes

Root Cause Analysis

The crash occurs because Korean characters are 3 bytes each in UTF-8. The code appears to be slicing the string at byte index 12, which falls in the middle of the character '액' (bytes 10..13), causing a panic due to invalid UTF-8 boundary.

Environment

  • Claude Code version: 2.0.76
  • OS: macOS (Darwin 25.1.0)
  • Platform: darwin

Expected Behavior

Claude Code should correctly handle multi-byte Unicode characters (Korean, Chinese, Japanese, emoji, etc.) when displaying diffs.

Workaround

Currently none - the CLI crashes whenever it tries to display diffs containing Korean text.

View original on GitHub ↗

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