Version: (using KDE KDE 3.5.6) Installed from: Gentoo Packages Compiler: not important OS: Linux KDE assumes all data received from remote CUPS server to be in local charset, which is incorrect - CUPS uses UTF8 everywhere by default. This simple patch corrects this problem: diff -ur kdeprint/cups/ipprequest.cpp kdeprint/cups/ipprequest.cpp --- kdeprint/cups/ipprequest.cpp 2007-01-15 14:34:19.000000000 +0300 +++ kdeprint/cups/ipprequest.cpp 2007-05-08 14:37:01.000000000 +0400 @@ -260,7 +260,7 @@ ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type); if (attr) { - value = QString::fromLocal8Bit(attr->values[0].string.text); + value = QString::fromUtf8(attr->values[0].string.text); return true; } else return false; @@ -274,7 +274,7 @@ if (attr) { for (int i=0;i<attr->num_values;i++) - values.append(QString::fromLocal8Bit(attr->values[i].string.text)); + values.append(QString::fromUtf8(attr->values[i].string.text)); return true; } else return false; diff -ur kdeprint/cups/kmcupsmanager.cpp kdeprint/cups/kmcupsmanager.cpp --- kdeprint/cups/kmcupsmanager.cpp 2007-01-15 14:34:19.000000000 +0300 +++ kdeprint/cups/kmcupsmanager.cpp 2007-05-08 14:37:36.000000000 +0400 @@ -482,7 +482,7 @@ QString attrname(attr->name); if (attrname == "printer-name") { - QString value = QString::fromLocal8Bit(attr->values[0].string.text); + QString value = QString::fromUtf8(attr->values[0].string.text); printer->setName(value); printer->setPrinterName(value); } @@ -512,7 +512,7 @@ } else if (attrname == "printer-location") { - printer->setLocation(QString::fromLocal8Bit(attr->values[0].string.text)); + printer->setLocation(QString::fromUtf8(attr->values[0].string.text)); } else if (attrname == "printer-is-accepting-jobs") {
This patch should be checked, tested and applied ASAP.
Thanks for the patch, Alex!
This fixes an issue with a german string viewed in kprinter. Typ: Laserdrucker (schwarz/weiß). The german ß is now shown correctly. Without the patch it was shown as garbage. A quick test does not show any harm. The patch should be applied at least in trunk to get a broader testbase.
https://bugs.kde.org/show_bug.cgi?id=145182
KDEPrint is obsolete, unmaintained and will never be revived. Closing all open bugs.