about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorAustin Bonander <austin.bonander@gmail.com>2019-02-03 22:38:43 -0800
committerAustin Bonander <austin.bonander@gmail.com>2019-02-03 22:55:56 -0800
commit27c8dfddac4c69a6fd399abe537e1007306c58cf (patch)
treebe46054689b608f9139746724f431a7f3aa61c63 /src/libstd/sys/windows
parent4314dbaa761d463d136592ab7fc9cdae46c8cc2a (diff)
downloadrust-27c8dfddac4c69a6fd399abe537e1007306c58cf.tar.gz
rust-27c8dfddac4c69a6fd399abe537e1007306c58cf.zip
Improve error message and docs for non-UTF-8 bytes in stdio on Windows
cc #23344
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/stdio.rs4
1 files changed, 3 insertions, 1 deletions
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 {