From e4f2ebb5688bdab5d844e7907a94ad2c9c994aa0 Mon Sep 17 00:00:00 2001 From: ubbo Date: Sun, 3 Jan 2010 13:02:30 +0000 Subject: halfway fix utf8-encoding (quoted printable still doesn't show correct), add utf8-testdata git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@236 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- gpgwin.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gpgwin.cpp') diff --git a/gpgwin.cpp b/gpgwin.cpp index 7c3cac2..f2fe931 100644 --- a/gpgwin.cpp +++ b/gpgwin.cpp @@ -402,7 +402,7 @@ void GpgWin::encrypt() QList *uidList = mKeyList->getChecked(); QByteArray *tmp = new QByteArray(); - if (mCtx->encrypt(uidList, edit->toPlainText().toAscii(), tmp)) { + if (mCtx->encrypt(uidList, edit->toPlainText().toUtf8(), tmp)) { QString *tmp2 = new QString(*tmp); edit->setPlainText(*tmp2); } @@ -416,8 +416,7 @@ void GpgWin::decrypt() preventNoDataErr(&text); mCtx->decrypt(text, tmp); if (!tmp->isEmpty()) { - QString *tmp2 = new QString(*tmp); - edit->setPlainText(*tmp2); + edit->setPlainText(QString::fromUtf8(*tmp)); } } -- cgit v1.2.3