readln of german Umlaute (terminal.d) / readln)

Andre Pany andre at s-e-a-p.de
Tue Oct 17 12:08:57 UTC 2017


Hi,

I want to read passwords from the console (should be work on 
windows / linux / macos).
Adam Ruppe has a quite nice library (terminal.d) which allows to 
deactivating the echo to the console, which makes sense for 
passwords.

But I do not get it working with terminal.d nor with std.stdio: 
readln if it comes to special characters like ö.

The password is saved to a file.
readln will save for "ööö": "x94x94x94\n"
terminal.d will save: CCHCCHCCH

Changing the code page (CHCP 65001) will lead to the effect that 
empty strings are saved for both (readln, terminal.d)

Does someone already solved this problem and has a solution 
working on all operation systems?

Kind regadrs
André




More information about the Digitalmars-d-learn mailing list