[Bug #20704] Win32: Fix chdir to non-ASCII path

On Windows, `chdir` in compilers' runtime libraries uses the active
code page, but command line arguments in ruby are always UTF-8, since
commit:33ea2646b98adb49ae2e1781753bf22d33729ac0.
This commit is contained in:
Nobuyoshi Nakada 2024-08-29 10:51:33 +09:00
parent 871ba3e9e3
commit d33e3d47b8
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465
Notes: git 2024-08-29 10:43:53 +00:00
2 changed files with 15 additions and 2 deletions

2
ruby.c
View file

@ -559,6 +559,8 @@ translit_char_bin(char *p, int from, int to)
#endif
#ifdef _WIN32
# undef chdir
# define chdir rb_w32_uchdir
# define UTF8_PATH 1
#endif