From 27c8dfddac4c69a6fd399abe537e1007306c58cf Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Sun, 3 Feb 2019 22:38:43 -0800 Subject: Improve error message and docs for non-UTF-8 bytes in stdio on Windows cc #23344 --- src/libstd/sys/windows/stdio.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstd/sys/windows') diff --git a/src/libstd/sys/windows/stdio.rs b/src/libstd/sys/windows/stdio.rs index a4f4bd22cd9..0ea19a85525 100644 --- a/src/libstd/sys/windows/stdio.rs +++ b/src/libstd/sys/windows/stdio.rs @@ -188,7 +188,9 @@ impl Output { } fn invalid_encoding() -> io::Error { - io::Error::new(io::ErrorKind::InvalidData, "text was not valid unicode") + io::Error::new(io::ErrorKind::InvalidData, + "Windows stdio in console mode does not support non-UTF-8 byte sequences; \ + see https://github.com/rust-lang/rust/issues/23344") } fn readconsole_input_control(wakeup_mask: c::ULONG) -> c::CONSOLE_READCONSOLE_CONTROL { -- cgit 1.4.1-3-g733a5