Skip to content

Commit 73168bc

Browse files
committed
Allow dropping unknown characters.
unicows just doesn't understand emojis :(
1 parent 84a0d2b commit 73168bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/windows/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ fn write_valid_utf8_to_console(handle: c::HANDLE, utf8: &str) -> io::Result<usiz
183183
// where the underlying byte sequence is valid utf-8 (given the check in `write()`).
184184
let result = c::MultiByteToWideChar(
185185
c::CP_UTF8, // CodePage
186-
c::MB_ERR_INVALID_CHARS, // dwFlags
186+
0, // dwFlags
187187
utf8.as_ptr(), // lpMultiByteStr
188188
utf8.len() as c::c_int, // cbMultiByte
189189
utf16.as_mut_ptr() as c::LPWSTR, // lpWideCharStr

0 commit comments

Comments
 (0)