Open
Description
The Windows console works with text whereas our Read
and Write
traits deal with arbitrary bytes. We currently use the Unicode Windows APIs and assume the bytes are in fact UTF-8. If they're not then we return an error. Similarly we expect that the input from the console will be actual Unicode text (I'd be surprised if it ever wasn't but I guess it's possible) and again we error if it's not. See here, here and here.
Seeing as the console is a text interface, rather than a binary one, why not lossily replace any invalid Unicode to the replacement character?