Japanese text output is garbled due to encoding issues

Resolved 💬 6 comments Opened Sep 29, 2025 by naclqn Closed Oct 18, 2025
💡 Likely answer: A maintainer (joshka-oai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.42.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

Description

When generating code or text containing Japanese characters, the output is garbled (mojibake).
It looks like an encoding issue (possibly UTF-8 vs Shift-JIS or similar).

Steps to Reproduce

  1. Generate text/code that includes Japanese characters using Codex.
  2. Observe that the output contains broken characters like ã^A“ã‚“ã^A«ã^A¡ã^A¯.

Expected Behavior

Japanese characters should be displayed correctly (e.g., こんにちは).

Actual Behavior

Japanese characters are displayed as mojibake (garbled text).

Additional Context

It seems to be an encoding mismatch in the text stream. UTF-8 should be enforced for Japanese output.

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

6 Comments

naclqn · 11 months ago

<img width="295" height="86" alt="Image" src="https://github.com/user-attachments/assets/f235a3be-38c0-4351-bbb9-e6a35ce8a26c" />

joshka-oai contributor · 10 months ago

I think this will probably be fixed by #4921, but I'm not sure if this issue applies to the cli or vscode (or web perhaps). Can you please clarify?

github-actions[bot] contributor · 10 months ago

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

  • #4574
  • #4498
  • #4768

Powered by Codex Action

joshka-oai contributor · 10 months ago

Closing out as fixed by #4921 If this is in error, please re-open and we'll take another look. Thanks for raising this issue.

Mantylo · 7 months ago

Still happens for codex 5.2

etraut-openai contributor · 7 months ago

@Mantylo, this bug wasn't caused by a model issue. It was a bug in the Codex harness. If you're seeing something like this in the latest version of Codex, please open a new bug report and provide repro steps. If you use the /feedback slash command, you can upload your logs and session details and provide the thread ID in the bug report.