-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage zero as language id for FormatMessageW()
#114983
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @ChrisDenton (rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
Aug 19, 2023
Thanks! @bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Aug 19, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 19, 2023
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).
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 19, 2023
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).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 19, 2023
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#114605 (Increase clarity about Hash - Eq consistency in HashMap and HashSet docs) - rust-lang#114934 (instantiate response: no unnecessary new universe) - rust-lang#114950 (Inline strlen_rt in CStr::from_ptr) - rust-lang#114973 (Expose core::error::request_value in std) - rust-lang#114983 (Usage zero as language id for `FormatMessageW()`) - rust-lang#114991 (remove redundant var rebindings) - rust-lang#114992 (const-eval: ensure we never const-execute a function marked rustc_do_not_const_check) - rust-lang#115001 (clippy::perf stuff) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 isneutral
first, thenthread ui lang
, thenuser language
, thensystem language
, thenEnglish
. (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).