Summary: | passwords with 8bit characters fails | ||
---|---|---|---|
Product: | [Unmaintained] kpdf | Reporter: | petrus |
Component: | general | Assignee: | Albert Astals Cid <aacid> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
petrus
2006-12-19 08:00:33 UTC
Reassigning to kdelibs as it's a problem on KPasswordDialog, most probably on KPasswordEdit::keyPressEvent Reassigning to me again as i'm not sure this is a kdelibs bug I find this problem when I use spanish keymap and want input spanish password in kdm and kdesktop lockdialog. this is the patch for it. you can use "ñÑÑÑÑ" to test it. --- kpassdlg.cpp 2007-01-15 19:34:22.000000000 +0800 +++ /kpassdlg.cpp 2007-03-06 11:43:46.000000000 +0800 @@ -118,7 +118,7 @@ else m_EchoMode = OneStar; - setInputMethodEnabled( true ); +// setInputMethodEnabled( true ); } KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name, int echoMode) @@ -160,8 +160,8 @@ void KPasswordEdit::insert(const QString &txt) { - const QCString localTxt = txt.local8Bit(); - const unsigned int lim = localTxt.length(); + const char * localTxt = txt.latin1(); + const unsigned int lim = strlen(localTxt); const int m_MaxLength = maxPasswordLength(); for(unsigned int i=0; i < lim; ++i) { @@ -211,9 +211,10 @@ } break; default: - const unsigned char ke = e->text().local8Bit()[0]; + const unsigned char ke = e->text().latin1()[0]; if (ke >= 32) { - insert(e->text()); + //fprintf(stderr,"%s\n\n",e->text().utf8().data()); + insert(e->text().utf8()); } else e->ignore(); break; SVN commit 731536 by aacid: PDF passwords are latin1, so encode them correctly BUG: 138997 M +1 -1 generator_pdf.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=731536 |