Panic on Korean string handling - byte index not char boundary
Resolved 💬 3 comments Opened Jan 3, 2026 by jemulpoclub Closed Jan 6, 2026
Environment
- Claude Code version: 2.0.76
- OS: Rocky Linux 9
- Platform: linux x86_64
Error Message
thread '<unnamed>' (1097796) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 5 is not a char boundary; it is inside '리' (bytes 3..6) of `고리 `
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting
Aborted (core dumped)
Context
- Working on a Korean help system with diagrams
- The string
고리appears to be part of a word like "카테고리" (category) - Claude Code crashed completely with core dump
Possible Cause
- UTF-8 byte boundary not properly handled when truncating Korean strings
- String slicing during markdown/diagram rendering
Additional Notes
- Korean characters use 3 bytes in UTF-8
- The panic occurs at byte index 5, which is inside the character '리' (bytes 3-6)
- This suggests the code is using byte indexing instead of character-aware indexing
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗