From 6b1da98d91d7171b93a62d6b82c5dc62e3c0e030 Mon Sep 17 00:00:00 2001 From: alt3r 3go Date: Sun, 17 Nov 2019 22:03:30 +0100 Subject: Linux/MacOS: text mode did not recognize Unicode in passwords (#540) (#551) --- src/Main/TextUserInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index 69d45af4..4de2cb2d 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -41,7 +41,9 @@ namespace VeraCrypt #endif { FInputStream.reset (new wxFFileInputStream (stdin)); - TextInputStream.reset (new wxTextInputStream (*FInputStream)); + // Set fallback encoding of the stream converter to UTF-8 + // to make sure we interpret multibyte symbols properly + TextInputStream.reset (new wxTextInputStream (*FInputStream, wxT(" \t"), wxConvAuto(wxFONTENCODING_UTF8))); } } -- cgit v1.2.3