retitle 524406 apt: use //TRANSLIT when recoding Description reassign 524406 apt tag 524406 patch thanks
On Thu, Apr 16, 2009 at 10:48:54PM +0200, Kurt Roeckx wrote:
> Package: kbd
> Version: 1.15-1
>
> Hi,
>
> The description currently says:
> Description: Linux console font and keytable utilities
> This package allows you to set up the Linux console, change the font,
> resize text mode virtual consoles and remap the keyboard.
> .
> You will probably want to install a set of data files, such as the one
> in the
>
>
> I think there is a part missing.
The description is complete, but the next character is a Unicode
character (LEFT DOUBLE QUOTATION MARK, “) without a direct counterpart
in the charset you use. Some other packages are also affected by this —
try “LANG=C apt-cache show writer2latex”, for example –, so I guess it
makes sense to tackle this problem at its root.
The easiest fix I can think of is iconv’s transliteration feature, which
automatically replaces problematic characters with a close match:
$ echo “” | iconv -f UTF-8 -t ASCII//TRANSLIT
""
A patch for apt is attached.
Cheers,
--
Michael Schutte <[email protected]>
--- apt-0.7.20.2/apt-pkg/contrib/strutl.cc 2009-02-07 16:09:35.000000000 +0100
+++ apt-0.7.20.2+524406/apt-pkg/contrib/strutl.cc 2009-04-18 11:41:48.000000000 +0200
@@ -45,8 +45,10 @@
const char *inbuf;
char *inptr, *outbuf, *outptr;
size_t insize, outsize;
+ char tocode[strlen(codeset) + 11];
+ sprintf(tocode, "%s//TRANSLIT", codeset);
- cd = iconv_open(codeset, "UTF-8");
+ cd = iconv_open(tocode, "UTF-8");
if (cd == (iconv_t)(-1)) {
// Something went wrong
if (errno == EINVAL)
signature.asc
Description: Digital signature

