VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralt3r 3go <alt3r.3go@protonmail.com>2019-11-17 21:03:30 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-17 21:03:30 (GMT)
commit6b1da98d91d7171b93a62d6b82c5dc62e3c0e030 (patch)
treeb9f405ea5b910ca7cb12f4e64bd72dab78e04b5d
parent64de5bc78a7b101bc55e19ae520c328f749bdf74 (diff)
downloadVeraCrypt-6b1da98d91d7171b93a62d6b82c5dc62e3c0e030.zip
VeraCrypt-6b1da98d91d7171b93a62d6b82c5dc62e3c0e030.tar.gz
Linux/MacOS: text mode did not recognize Unicode in passwords (#540) (#551)
-rw-r--r--src/Main/TextUserInterface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 69d45af..4de2cb2 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)));
}
}