Skip to content

fix(web): make server banner encoding-safe#2536

Open
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/fix-windows-banner-encoding
Open

fix(web): make server banner encoding-safe#2536
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/fix-windows-banner-encoding

Conversation

@lihailong00

@lihailong00 lihailong00 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • encode banner lines using the active stdout encoding with replacement for unsupported characters
  • preserve the existing banner output on UTF-8 terminals
  • add a regression test using a strict GBK stdout stream

Validation

  • uv run pytest tests/utils/test_server.py -q (21 passed)
  • uv run ruff check (passed)
  • uv run ruff format --check (passed)

Full Windows-only checks still contain unrelated pre-existing POSIX compatibility failures in editor/file-filter tests and pty/ioctl type checks.

Closes #2532


Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kimi web crashes at startup on Windows when stdout is redirected: UnicodeEncodeError (gbk) in print_banner

1 participant