mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Linux: Ensure that the python embedded in the kitty binary build always uses UTF-8 mode
Fixes #924
This commit is contained in:
@@ -153,6 +153,10 @@ int main(int argc, char *argv[]) {
|
||||
final_argv[i+1] = argv[i];
|
||||
num_args++;
|
||||
}
|
||||
#if PY_VERSION_HEX >= 0x03070000
|
||||
// Always use UTF-8 mode, see https://github.com/kovidgoyal/kitty/issues/924
|
||||
Py_UTF8Mode = 1;
|
||||
#endif
|
||||
for (i = 0; i < num_args; i++) {
|
||||
argvw[i] = Py_DecodeLocale(final_argv[i], NULL);
|
||||
if (argvw[i] == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user