Skip to content

Unicode input on windows command line does not work #15028

Closed
@retep998

Description

@retep998

When using stdin with my rust program run from either the windows command line or git bash, any unicode characters are turned into question marks.
So "Алло" becomes [63, 63, 63, 63].
If I change the codepage of the windows command line to utf-8 via chcp 65001, then when I enter in any unicode characters stdin returns EndOfFile.

On the flip side, output using libgreen works fine (because libuv translates utf-8 to utf-16 and calls WriteConsoleW), while output using libnative produces garbage for unicode because it writes utf-8 as if it were ascii.

Using windows 8.1 x64, with 32-bit Rust nightly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions