Skip to content

fix(windows): prevent Unicode output crashes on legacy code pages - #3

Closed
scwf wants to merge 1 commit into
mainfrom
fix/windows-legacy-codepages
Closed

scwf wants to merge 1 commit into
mainfrom
fix/windows-legacy-codepages

Conversation

@scwf

@scwf scwf commented Jul 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

@github-actions github-actions Bot added the size/L Pull request size: L label Jul 24, 2026
@scwf

scwf commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

@codex plz review this pr

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@scwf

scwf commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eaf9d7fd40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread omnigent/cli.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eaf9d7fd40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread omnigent/cli.py Outdated
@scwf
scwf force-pushed the fix/windows-legacy-codepages branch from eaf9d7f to 5647cde Compare July 24, 2026 07:52
@scwf

scwf commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

I updated this branch, @codex review again

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@scwf

scwf commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5647cde234

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread omnigent/_platform.py
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 5647cde234

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@scwf
scwf force-pushed the fix/windows-legacy-codepages branch from 5647cde to ff508b5 Compare July 24, 2026 08:08
@scwf

scwf commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: ff508b5778

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@scwf
scwf force-pushed the fix/windows-legacy-codepages branch from ff508b5 to 3331737 Compare July 24, 2026 08:46
Legacy Windows code pages could crash CLI and host operations when user-facing output contained unsupported Unicode glyphs.

Make CLI stdio configuration aware of terminals versus redirected streams so console output uses UTF-8 without breaking CP936 subprocess capture. Restore the attached console's previous output code page on process exit so short Omnigent commands do not affect later programs in the parent shell.

Route host lifecycle and authentication messages through safe console output so encoding failures cannot interrupt tunnel handling after a runner has started or stopped.

Initialize stdio in standalone CLI and host-daemon module entry points, and force daemon stdout and stderr to UTF-8 with replacement so managed subprocess paths receive the same protection.

Add regression coverage for GBK consoles, redirected streams, code-page restoration, Unicode runner paths, module entry points, daemon startup, and daemon log encoding.

Signed-off-by: scwf <wangfei_hello@126.com>
@scwf
scwf force-pushed the fix/windows-legacy-codepages branch from 3331737 to 8280dff Compare July 24, 2026 08:50
@scwf scwf changed the title fix(windows): harden CLI and host output on legacy code pages fix(windows): prevent Unicode output crashes on legacy code pages Jul 24, 2026
@scwf scwf closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Pull request size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant