Support for different file encodings and windows style line endings in apply_patch internal function and codex.exe command line apply patch
Resolved 💬 2 comments Opened May 5, 2026 by primozcerar Closed Jul 1, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
App
What feature would you like to see?
Currently apply_patch fails on non UTF-8 encoded files, making codex revert to other commands/tools for patching code and as a consequence there is no file diff report in the app window. I suggest making apply_patch encoding aware either by ascertaining the encoding or by having the encoding passed in as an argument.
Other issue on windows is also that apply_patch uses linux style line endings only (LF) and this causes files with mixed line endings that IDEs then complain about. It should either maintain the current file line endings or have a setting or input argument to allow windows style line endings (CRLF).
Additional information
_No response_
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This feature request hasn't received enough upvotes, so it is being closed automatically. If you still feel this feature is needed, please open a new feature request with an updated title and description.