Commit d761a5f
authored
Rollup merge of rust-lang#114983 - crlf0710:formatmsg, r=ChrisDenton
Usage zero as language id for `FormatMessageW()`
This switches the language selection from using system language (note that this might be different than application language, typically stored as thread ui language) to use `FormatMessageW` default search strategy, which is `neutral` first, then `thread ui lang`, then `user language`, then `system language`, then `English`. (See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-formatmessagew)
This allows the Rust program to take more control of `std::io::Error`'s message field, by setting up thread ui language themselves before hand (which many programs already do).1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
| |||
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
| 55 | + | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | | - | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
| |||
0 commit comments