[Bug] UTF-8 string slicing panic with non-ASCII characters in code generation
Resolved 💬 3 comments Opened Jan 7, 2026 by userqz1 Closed Jan 10, 2026
Context
- I was implementing C++ header files (ConnectedComponent and DistanceTransform)
- The code/comments contained Chinese characters
- The UI showed "accept edits on (shift+tab to cycle)" when the crash occurred
Version
- Claude Code: 2.0.76
Expected Behavior
Claude Code should handle UTF-8 Chinese characters correctly without crashing.
Actual Behavior
The application panicked due to incorrect byte index calculation when slicing a string containing Chinese characters.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗