Shujian AI SJ-MailShujian AI
Home Solutions AI Assistant Enterprise Download About Privacy 中文

Why does the AI streaming reply sometimes show garbled Chinese characters?

Cured in v0.9.0: streaming chunks used to cut UTF-8 multi-byte characters in half. Upgrade and it is gone.

Symptoms

While an AI reply streams in (typewriter effect), Chinese characters occasionally turn into mojibake mid-stream; the next generation looks fine again. The problem appears randomly and seems length-related.

Cause

AI replies stream as SSE chunks, and each UTF-8 Chinese character takes 3 bytes. The old implementation decoded every network chunk as it arrived; when a chunk boundary fell in the middle of a multi-byte character the truncated sequence decoded into garbage — hence random, content-length-dependent occurrences.

Fix

  1. Upgrade to SJ-Mail v0.9.0 or later (see the download page).
  2. Nothing to configure — the streaming renderer now uses incremental UTF-8 decoding: incomplete byte sequences wait for the next chunk before decoding, so multi-byte characters are never cut in half.
✓ Fixed in v0.9.0 | Affected: v0.8.x and earlier. The fix covers every AI streaming scenario (writing assistant, chat, summary, translation).

FAQ

Q: Is garbled Chinese in AI streaming output a virus or data corruption?

A: No. It is a decoding display issue caused by stream chunk boundaries falling inside a UTF-8 multi-byte character. The mail data itself is intact, and v0.9.0 cures it completely.

Q: Why does the garbling appear randomly?

A: Network chunk boundaries differ each time; garbling only happens when a boundary lands mid-character, so it looks random.

Q: Do I need to regenerate previously garbled replies after upgrading?

A: Previously generated text is unaffected (it was a display-layer issue). If a specific old reply still displays oddly, simply regenerate it.

Related

Download the latest SJ-Mail | Connect WorkBuddy via MCP →

Home· Download· Changelog· About· Privacy· Contact sales· 中文

Friendly links: eYou · Anke Xinchuang

© 2025-2026 Shujian AI (书简智能). All rights reserved.