[Bug] UTF-8 string slicing panic with non-ASCII characters in code generation

Status Closed — duplicate
Reported on v2.0.76
Maintainer reply None cached
Activity 3 comments · opened Jan 7, 2026 · 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.

View original on GitHub ↗

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