Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use unicode for passwords on Windows #82

Open
vladmikhalin opened this issue Mar 21, 2023 · 1 comment
Open

Unable to use unicode for passwords on Windows #82

vladmikhalin opened this issue Mar 21, 2023 · 1 comment

Comments

@vladmikhalin
Copy link

Trying to use the library (7.2.0) but getting errors or question marks instead of entered characters when using Unicode on Windows.

Example code that reproduces this:

use std::io::Write;

fn main() {
    // copy these strings and enter them as password
    println!("éëęėεeeη"); // Error: stream did not contain valid UTF-8
    println!("äáàâăåαā"); // Error: stream did not contain valid UTF-8
    println!("её");       // "??"
    print!("password: ");
    std::io::stdout().flush().unwrap();
    let password = rpassword::read_password().unwrap();
    println!("{}", password);
}
@conradkleinespel
Copy link
Owner

Hello ! Thanks for reporting. This project has few maintainers and our time is limited so you'll most likely have to find a fix and submit a PR with test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants