Skip to content

Commit

Permalink
Use non-local OS error strings (en-US)
Browse files Browse the repository at this point in the history
  • Loading branch information
liigo committed Jun 23, 2016
1 parent 6dcc2c1 commit 37a8f94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libstd/sys/windows/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ pub fn errno() -> i32 {
/// Gets a detailed string description for the given error number.
pub fn error_string(errnum: i32) -> String {
// This value is calculated from the macro
// MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_SYS_DEFAULT)
let langId = 0x0800 as c::DWORD;
// MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)
// Don't use system default language id here, since localization strings
// may be escaped, and result in unreadable output. CC #34318.
let langId = 0x0409 as c::DWORD;

let mut buf = [0 as c::WCHAR; 2048];

Expand Down

0 comments on commit 37a8f94

Please sign in to comment.