Codex App terminal: git log shows Japanese UTF-8 commit messages as <E6><...> when locale env vars are empty

Open 💬 2 comments Opened Jun 8, 2026 by inoway46

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

Version 26.602.40724

What subscription do you have?

Pro

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

In the Codex App terminal, git log displays Japanese UTF-8 commit messages as byte escapes like <E6><97><A5>....

Example:

ABC-1234 <E6><97><A5><E6><9C><AC><E8><AA><9E><E3><81><AE><E3><82><B3><E3><83><9F><E3><83><83><E3><83><88><E3><83><A1><E3><83><83><E3><82><BB><E3><83><BC><E3><82><B8>

However, the commit message itself is valid UTF-8. Running git --no-pager log -1 displays the Japanese text correctly:

ABC-1234 日本語のコミットメッセージ

This seems to happen only when Git uses a pager. The terminal itself can render Japanese correctly when bypassing the pager with git --no-pager log.

What steps can reproduce the bug?

  1. Open the Codex App terminal.
  1. In a Git repository with Japanese UTF-8 commit messages, run:
git log
  1. Japanese text is displayed as byte escapes such as <E6><97><A5>....
  1. Run:
git --no-pager log -1
  1. Japanese text is displayed correctly.

What is the expected behavior?

The Codex App terminal should initialize a UTF-8 locale environment, or otherwise ensure that pagers such as less handle UTF-8 output correctly.

For example, git log should display Japanese UTF-8 commit messages correctly without requiring users to manually set LESSCHARSET=utf-8.

Additional information

Environment variables inside Codex App terminal

I checked the locale and pager-related environment variables:

echo "LANG=$LANG"
echo "LC_ALL=$LC_ALL"
echo "LC_CTYPE=$LC_CTYPE"
echo "LESSCHARSET=$LESSCHARSET"
echo "PAGER=$PAGER"
echo "GIT_PAGER=$GIT_PAGER"

Output:

LANG=
LC_ALL=
LC_CTYPE=
LESSCHARSET=
PAGER=
GIT_PAGER=

Workaround

This fixes the display:

LESSCHARSET=utf-8 git log

or globally for Git:

git config --global core.pager 'LESSCHARSET=utf-8 less -R'

Notes

This looks different from general mojibake issues because the terminal can render Japanese correctly. The problem appears when git log invokes less while locale-related environment variables such as LANG, LC_ALL, and LC_CTYPE are empty.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗