Elijah Koulaxis
d660233edf
fix(windows): force console codepage to UTF-8 for shell/system() #38742
...
Problem:
On Windows, `:!echo тест` shows `????` because the console code page defaults to a legacy ANSI encoding (e.g. CP1252) instead of `UTF-8`
Solution:
Call `SetConsoleOutputCP(CP_UTF8)` and `SetConsoleCP(CP_UTF8)` in `do_os_system()` before spawning child processes, and restore the original values after. It covers both `:!` and `system()` since they both go through `do_os_system()`
(cherry picked from commit bba48ee1b0 )
2026-04-05 23:47:51 +00:00
..
2025-07-11 07:20:25 +08:00
2024-04-23 18:17:04 +02:00
2024-09-23 14:42:57 +02:00
2024-04-23 18:17:04 +02:00
2025-01-16 11:17:14 +08:00
2024-04-23 18:17:04 +02:00
2024-04-23 18:17:04 +02:00
2026-02-14 10:49:39 +08:00
2026-02-20 06:53:33 +08:00
2025-05-04 11:22:57 -04:00
2024-04-23 18:17:04 +02:00
2026-03-18 19:54:19 -04:00
2025-09-24 14:25:54 +08:00
2025-02-04 01:31:37 +00:00
2024-04-23 18:17:04 +02:00
2024-04-23 18:17:04 +02:00
2026-01-21 12:02:20 +08:00
2024-04-23 18:17:04 +02:00
2024-11-14 12:40:57 +01:00
2025-09-22 14:03:42 +08:00
2024-04-23 18:17:04 +02:00
2024-04-23 18:17:04 +02:00
2026-01-07 06:00:49 +08:00
2024-11-14 12:40:57 +01:00
2025-09-22 14:03:42 +08:00
2024-04-23 18:17:04 +02:00
2026-02-03 16:31:27 +08:00
2025-01-02 05:51:03 -08:00
2025-09-22 14:03:42 +08:00
2025-09-22 14:03:42 +08:00
2024-04-23 18:17:04 +02:00
2026-02-05 07:45:45 -05:00
2024-04-23 18:17:04 +02:00
2026-02-09 07:19:50 -05:00
2024-04-23 18:17:04 +02:00
2025-12-06 21:49:16 +08:00
2024-04-23 18:17:04 +02:00
2024-04-23 18:17:04 +02:00
2026-02-12 17:31:12 +08:00
2026-04-05 23:47:51 +00:00
2025-02-05 11:36:01 +08:00
2025-09-22 14:03:42 +08:00
2026-02-25 13:06:53 -05:00
2026-02-13 21:02:40 +08:00
2024-04-23 18:17:04 +02:00