We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dcc2c1 commit 37a8f94Copy full SHA for 37a8f94
src/libstd/sys/windows/os.rs
@@ -37,8 +37,10 @@ pub fn errno() -> i32 {
37
/// Gets a detailed string description for the given error number.
38
pub fn error_string(errnum: i32) -> String {
39
// This value is calculated from the macro
40
- // MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_SYS_DEFAULT)
41
- let langId = 0x0800 as c::DWORD;
+ // MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)
+ // Don't use system default language id here, since localization strings
42
+ // may be escaped, and result in unreadable output. CC #34318.
43
+ let langId = 0x0409 as c::DWORD;
44
45
let mut buf = [0 as c::WCHAR; 2048];
46
0 commit comments