[BUG] Rust panic on UTF-8 char boundary when processing Korean text files
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?
Claude Code crashes with a Rust panic when processing text files containing Korean (or other multi-byte UTF-8) characters. The panic occurs because the code attempts to slice a string at a byte index that falls in the middle of a multi-byte character.
What Should Happen?
Claude Code should properly handle UTF-8 multi-byte characters by ensuring string slicing only occurs at valid character boundaries, not arbitrary byte positions.
Error Messages/Logs
thread '<unnamed>' (79760) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb\library\core\src\str\mod.rs:833:21:
byte index 86 is not a char boundary; it is inside '요' (bytes 84..87) of `엔 달력 보면서 손으로 계산했는데, 계산이 틀린 적도 있었거든요.`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Steps to Reproduce
- Create a text file containing Korean text, for example:
옛날엔 달력 보면서 손으로 계산했는데, 계산이 틀린 적도 있었거든요.
- Open Claude Code in the directory containing this file
- Attempt to update or process the file (e.g., editing, reading with truncation)
- The Rust panic occurs when the string is sliced at a non-character boundary
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
This is a common Rust UTF-8 handling issue. The fix typically involves using .chars() iterator or .char_indices() instead of direct byte indexing, or using safe slicing methods that respect character boundaries.
The bug appears to occur in a string truncation or display formatting context, possibly when showing file update notifications or content previews.
Affected text was from a Korean lecture script file: 2026-01-07_강의스크립트_30분_초안.txt
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Hi @blois @shawnm-anthropic,
This appears to be the same issue as #14133, which has been open since December 2025 with 25+ reactions and 16 comments.
Could you please prioritize this issue? Many Japanese, Korean, and Chinese users are blocked by this UTF-8 char boundary bug in their daily work.
Thanks for all your work on Claude Code!
Hi @Kyoungsoo2314, sorry for the crash. Unfortunately I'm not able to repro, even trying a handful of different variations. Does this work for you?
<img width="1456" height="1132" alt="Image" src="https://github.com/user-attachments/assets/2b961f3e-4d25-4379-8b38-8d2f7bed15ba" />
@shawnm-anthropic
Same as my comment on #14133:
I created a Japanese reproduction repository:
https://github.com/takatea/claude-code-utf8-crash-repro
The crash seems related to the number of changes — many changes crash, few changes succeed.
See: https://github.com/anthropics/claude-code/issues/14133#issuecomment-3733253985
The fix for this is scheduled to release today. Thank you for your patience!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.