We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d76720 commit ebc298dCopy full SHA for ebc298d
compat/mingw.c
@@ -2332,8 +2332,12 @@ void mingw_startup()
2332
* Avoid a segmentation fault when cURL tries to set the CHARSET
2333
* variable and putenv() barfs at our nedmalloc'ed environment.
2334
*/
2335
- if (!getenv("CHARSET"))
2336
- setenv("CHARSET", "cp1252", 1);
+ if (!getenv("CHARSET")) {
+ struct strbuf buf = STRBUF_INIT;
2337
+ strbuf_addf(&buf, "cp%u", GetACP());
2338
+ setenv("CHARSET", buf.buf, 1);
2339
+ strbuf_release(&buf);
2340
+ }
2341
2342
/* initialize critical section for waitpid pinfo_t list */
2343
InitializeCriticalSection(&pinfo_cs);
0 commit comments