From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NlIZH-000714-Us for garchives@archives.gentoo.org; Sat, 27 Feb 2010 09:02:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B158E0AF0 for ; Sat, 27 Feb 2010 09:02:35 +0000 (UTC) Received: from itp.ac.ru (itp.ac.ru [77.236.39.2]) by pigeon.gentoo.org (Postfix) with ESMTP id 144F6E09E4 for ; Sat, 27 Feb 2010 08:32:03 +0000 (UTC) Received: from tor17.itp.ac.ru (tor17.itp.ac.ru [77.236.39.48]) by itp.ac.ru (envelope-from alexpro@itp.ac.ru) (8.14.3/8.14.3) with ESMTP id o1R8W2os008689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 27 Feb 2010 11:32:02 +0300 X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.95.2 at itp DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=itp.ac.ru; s=itp2009; t=1267259522; bh=kl/aLrWH3+yavCxq1JpOvyzQ0/JQsx0Cv6tSbsp/VhI=; h=From:To:Subject:Date:MIME-Version:Content-Type:Message-Id; b=vmESmP4z/ur4P6+SlofiOmwbbSgKftyByPk3Az4FFYNMBK9XU2zeVuoOH9ZjwozdV NosOoTDTGuD5g+rxDjM/L1dDy3p2ERCXIZJwusODBYXxak4CDd58K6f75gAeFZjJJk kduLhyRpMe5KMmiVISvGEWX24r+on7a8OcF23bPM= From: "A.O.Prokofiev" To: gentoo-desktop@lists.gentoo.org Subject: [gentoo-desktop] kde 3.5.10 cups printer description patch Date: Sat, 27 Feb 2010 11:32:01 +0300 User-Agent: KMail/1.9.10 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-desktop@lists.gentoo.org Reply-to: gentoo-desktop@lists.gentoo.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_CiNiLAFgz4LrfUp" Message-Id: <201002271132.02085.alexpro@itp.ac.ru> X-Null-Tag: 55bb916d9fe2c8d3d2c99c25932b46cb X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (itp.ac.ru [77.236.39.2]); Sat, 27 Feb 2010 11:32:02 +0300 (MSK) X-DCC-sgs_public_dcc_server-Metrics: itp; whitelist X-Spam-Status: No, score=-3.7 required=8.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on itp.ac.ru X-Archives-Salt: fba748d6-b467-4b81-a930-ab884b0ea37e X-Archives-Hash: 0b284fa082f9f9a7b7121a6883f9f27b --Boundary-00=_CiNiLAFgz4LrfUp Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, There is a minor problem when using CUPS as a print system: printer description and location fields are stored as UTF8 in CUPS, while kde thinks it's in local encoding. Thus, when having 8-bit locale and printer description in national language, those strings are shown as garbage in print dialog. Attached patch solves this problem. -- With regards, A.Prokofiev. --Boundary-00=_CiNiLAFgz4LrfUp Content-Type: text/x-diff; charset="iso 8859-1"; name="kde-cups.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kde-cups.patch" diff -ur 1/kdeprint/cups/ipprequest.cpp 2/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;inum_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 1/kdeprint/cups/kmcupsmanager.cpp 2/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") { --Boundary-00=_CiNiLAFgz4LrfUp--