rust-lang / rust-lang/mdBook

2025-01-17 15:45:35 [ERROR] (mdbook::utils): Error: stream did not contain valid UTF-8

Open
#2,525 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

2025-01-17 15:45:35 [ERROR] (mdbook::utils): Error: stream did not contain valid UTF-8

Steps
  1. mdbook init demo
  2. cd demo
  3. mdbook serve
  4. ctrl+c to exit
  5. edit SUMMARY.md file in vscode (Encoding: UTF-8)

update - [Chapter 1](./chapter_1.md) to - [中文](./chapter_1.md)

  1. save
  2. mdbook serve, got the error: stream did not contain valid UTF-8

Image

Image

Image

Possible Solution(s)

No response

Notes

No response

Version

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with mdbook init demo, mdbook serve, and a Chinese entry in SUMMARY.md, then inspect how mdbook serve reads that file. Done means the edited UTF-8 SUMMARY.md is accepted and the book serves without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.