Debian Bug report logs - #457489
apt: Convert Packages/Source file from utf-8 to codeset.

version graph

Package: apt; Maintainer for apt is APT Development Team <[email protected]>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Kurt Roeckx <[email protected]>

Date: Sat, 22 Dec 2007 19:42:04 UTC

Severity: wishlist

Tags: patch

Found in version apt/0.7.9

Full log


🔗 View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#457489: apt: Convert Packages/Source file from utf-8 to codeset.
Reply-To: Kurt Roeckx <[email protected]>, [email protected]
Resent-From: Kurt Roeckx <[email protected]>
Resent-To: [email protected]
Resent-CC: APT Development Team <[email protected]>
Resent-Date: Sat, 22 Dec 2007 19:42:04 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: report 457489
X-Debian-PR-Package: apt
X-Debian-PR-Keywords: patch
X-Debian-PR-Source: apt
Received: via spool by [email protected] id=B.11983520485713
          (code B ref -1); Sat, 22 Dec 2007 19:42:04 +0000
Received: (at submit) by bugs.debian.org; 22 Dec 2007 19:34:08 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02 
	(2006-07-26) on rietz.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-8.5 required=4.0 tests=BAYES_00,FORGED_RCVD_HELO,
	HAS_PACKAGE,IMPRONONCABLE_1,MURPHY_DRUGS_REL8,MURPHY_WRONG_WORD1,
	MURPHY_WRONG_WORD2 autolearn=no 
	version=3.1.4-bugs.debian.org_2005_01_02
Received: from harold.telenet-ops.be ([195.130.133.65])
	by rietz.debian.org with esmtp (Exim 4.63)
	(envelope-from <[email protected]>)
	id 1J6A6p-0001Tj-Tq
	for [email protected]; Sat, 22 Dec 2007 19:34:08 +0000
Received: from localhost (localhost.localdomain [127.0.0.1])
	by harold.telenet-ops.be (Postfix) with SMTP id 2E7CA300C1
	for <[email protected]>; Sat, 22 Dec 2007 20:34:07 +0100 (CET)
Received: from intrepid.roeckx.be (d54C3F9BC.access.telenet.be [84.195.249.188])
	by harold.telenet-ops.be (Postfix) with ESMTP id 17F56300A2
	for <[email protected]>; Sat, 22 Dec 2007 20:34:07 +0100 (CET)
Received: by intrepid.roeckx.be (Postfix, from userid 1000)
	id E87ADEAACE; Sat, 22 Dec 2007 20:34:06 +0100 (CET)
Date: Sat, 22 Dec 2007 20:34:06 +0100
From: Kurt Roeckx <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="qMm9M+Fa2AknHoGS"
Content-Disposition: inline
User-Agent: Mutt/1.5.17 (2007-11-01)
Delivered-To: [email protected]
[Message part 1 (text/plain, inline)]
Package: apt
Version: 0.7.9
Severity: wishlist
Tags: patch

Hi,

It seems that currently apt does not convert the Packages or Sources
file to the codeset from the terminal.  This is probably because there
never was and still isn't a requirement that the debian/control
file is written in a certain encoding.  However most packages
do have their control file written so that they're compatible with UTF-8.
Apt also currently already converts the long description from UTF-8
to the current codeset.

It seems there currently are 11 packages that aren't compatible with
UTF-8:
http://lintian.debian.org/reports/Tdebian-control-file-uses-obsolete-national-encoding.html

There is also a release goad that tries to get rid of those, see
bug #453954.

I've attached a patch that tries to convert it from utf-8 to the
currently selected codeset, and return the original string if it fails.

One effect this change has is that descriptions for any of those packages
now show up fully instead of being truncated at the first char that
isn't UTF-8.  

I might not have written a patch that's does the changes at the right
place because I'm not familiar with the code.  But the changes work for
me.


Kurt

[utf8.diff (text/x-diff, attachment)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 09:32:43 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.