[BUG] Crash when editing Markdown files containing Japanese text with box-drawing characters

Resolved 💬 13 comments Opened Dec 16, 2025 by satoshi-myandemy Closed Jan 12, 2026

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?

Description

Claude Code crashes with a panic error when editing Markdown files that contain Japanese text combined with box-drawing characters (│, ─, etc.).

Environment

  • OS: macOS (Apple Silicon)
  • Claude Code version: [run claude --version to check]
  • Node.js version: [run node --version to check]

Steps to Reproduce

  1. Open a Markdown file containing Japanese text with box-drawing characters (e.g., tables with │ or UI wireframes)
  2. Start editing the file
  3. Claude Code crashes

Error Message

thread '<unnamed>' panicked at /rustc/.../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
zsh: abort      Claude

Expected Behavior

Claude Code should handle multi-byte UTF-8 characters correctly without crashing.

Additional Context

The crash occurs during text rendering/display when the terminal tries to split Japanese characters at incorrect byte boundaries.

What Should Happen?

Claude Code should handle multi-byte UTF-8 characters (including Japanese text and box-drawing characters like │, ─, ┌, └) correctly without crashing. The editor should be able to display and edit Markdown files containing these characters normally.

Error Messages/Logs

Steps to Reproduce

  1. Create or open a Markdown file containing Japanese text with box-drawing characters (│, ─, ┌, └)
  • Example content: UI wireframes or tables using characters like │ 単発イベント │ or ├─ id
  1. Run claude command to start Claude Code
  2. Ask Claude to edit the file (e.g., "Update this requirements document")
  3. Claude Code crashes during the editing/rendering process

Example text that triggers the crash:

  • 単発) ← 新規│
  • 済み(またはシリーズ登録者)のユー

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.70 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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