Codex use UTF-8 BOM by default and change Chinese to unreadable nonsenese

Resolved 💬 3 comments Opened Mar 27, 2026 by UIZorrot Closed Jul 2, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

latest

What subscription do you have?

plus

What platform is your computer?

windows, wsl

What issue are you seeing?

just let codex or gpt know, please use UTF-8 with no BOM by default.

What steps can reproduce the bug?

let codex do some chinese work and you will see. May other utf-8 language have this issue.

What is the expected behavior?

just let codex or gpt know, please use UTF-8 with no BOM by default. And when using command like get-content, should use utf-8 for non-english language.

Additional information

<img width="726" height="1020" alt="Image" src="https://github.com/user-attachments/assets/966e701a-2444-4b4b-bc75-50ce23660b58" />

like this

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14227
  • #15422

Powered by Codex Action

mbetrifork · 4 months ago

I prepared a fix for this on my fork, but this repository is currently configured to block PRs from non-collaborators

Branch:
https://github.com/mbetrifork/codex-fixes/tree/issue-15967

Commit:
a8eaccf8e Fix #15967: default PowerShell commands to UTF-8

Summary:

  • defaults PowerShell cmdlet encoding to UTF-8
  • fixes the Get-Content/UTF-8-no-BOM read path that can garble Chinese and other non-ASCII text on Windows PowerShell
  • adds regression tests

I can make a patch file if that's the only way to contribute the fix.

lightcomc · 3 months ago

bad that utf-8 md files is mojibaked EVERY time in codex Powershell calls. Fix wanted