
It looks like Debug::FormatMessageA() requires subsequent conversion from the national code page to UTF-8 here:
|
/// Formats a platform error code into a human-readable string. |
|
pub fn apperr_format(f: &mut std::fmt::Formatter<'_>, code: u32) -> std::fmt::Result { |
|
unsafe { |
|
let mut ptr: *mut u8 = null_mut(); |
|
let len = Debug::FormatMessageA( |
|
Debug::FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
| Debug::FORMAT_MESSAGE_FROM_SYSTEM |
|
| Debug::FORMAT_MESSAGE_IGNORE_INSERTS, |
|
null(), |
It looks like
Debug::FormatMessageA()requires subsequent conversion from the national code page to UTF-8 here:edit/src/sys/windows.rs
Lines 725 to 733 in ccfebb2