@@ -182,12 +182,12 @@ fn write_valid_utf8_to_console(handle: c::HANDLE, utf8: &str) -> io::Result<usiz |
|
|
182 |
182 |
// Note that this theoretically checks validity twice in the (most common) case |
183 |
183 |
// where the underlying byte sequence is valid utf-8 (given the check in `write()`). |
184 |
184 |
let result = c::MultiByteToWideChar( |
185 |
|
- c::CP_UTF8, // CodePage |
186 |
|
- c::MB_ERR_INVALID_CHARS, // dwFlags |
187 |
|
- utf8.as_ptr(), // lpMultiByteStr |
188 |
|
- utf8.len() as c::c_int, // cbMultiByte |
189 |
|
- utf16.as_mut_ptr() as c::LPWSTR, // lpWideCharStr |
190 |
|
- utf16.len() as c::c_int, // cchWideChar |
|
185 |
+ c::CP_UTF8, // CodePage |
|
186 |
+ c::MB_ERR_INVALID_CHARS, // dwFlags |
|
187 |
+ utf8.as_ptr(), // lpMultiByteStr |
|
188 |
+ utf8.len() as c::c_int, // cbMultiByte |
|
189 |
+ utf16.as_mut_ptr() as *mut c::WCHAR, // lpWideCharStr |
|
190 |
+ utf16.len() as c::c_int, // cchWideChar |
191 |
191 |
); |
192 |
192 |
assert!(result != 0, "Unexpected error in MultiByteToWideChar"); |
193 |
193 |
|