bootstrap: add explicit UTF-8 encoding to text-mode open() calls#152536
bootstrap: add explicit UTF-8 encoding to text-mode open() calls#152536ozankenangungor wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
If the script sets |
|
And please @ozankenangungor don't invoke Copilot in this project. |
|
Apologies, I won’t invoke Copilot again in this repository. Regarding the change: my understanding was that the issue aimed to avoid relying on the platform/locale-dependent default encoding, even in text mode. For that reason, I added If this is broader than intended, I’m happy to narrow the scope to only the cases where no mode/encoding was specified. |
This makes all text-mode
open()calls inbootstrap.pyexplicitly use
encoding="utf-8".Binary-mode (
"rb"/"wb") opens are left unchanged.The change is purely mechanical and does not alter behavior.
Tested with:
./x.py test bootstrap