#950334 aptitude: Help -> User's Manual contains special characters

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Bruno Kleinert
Date:
2023-09-21 02:48:03 UTC
Severity:
minor
Tags:
#950334#5
Date:
2020-01-31 13:48:20 UTC
From:
To:
Hi,

aptitude displays unwanted special characters in the user's manual view in a
German environment (I didn't test if the same happens with different locales).

To reproduce, I use the following locale environment:

fuddl@wurst:~$ locale
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

Start aptitude in an 80×24 characters terminal, select Hilfe (Help) -> Handbuch
(User's Manual) and press page down once. You should see an output as in the
left terminal window in the attached screenshot.

The terminal on the right of the screenshot is for reference and shows aptitude
with environment LANG=C. With that environment, aptitude displays the user's
manual correctly.

The special characters make the manual difficult to read, especially tables in
the manual.

Cheers

Bruno

#950334#10
Date:
2020-08-03 22:54:31 UTC
From:
To:
This is actually a broader bug and not related to specific locales.
The issue is that `src/ui.cc` defaults to transcoding the README files
to ISO-8859-1, and since all the README files are already UTF-8, you get
glitchy glyphs.

I'm attaching a patch for this specific issue, but note that I have an
open MR which includes this and a few more encoding related fixes:
https://salsa.debian.org/apt-team/aptitude/-/merge_requests/10/commits

Note also that I wasn't able to properly test this because of the
current FTBFS in:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966875

But that said, this is merely a string replacement, shouldn't be
problematic.

#950334#15
Date:
2020-08-04 09:37:16 UTC
From:
To:
Hi Diego,

Diego Escalante wrote:

Suspected that, yes. But then again, not in the way you noticed. (I
suspected ISO-Latin encoded chacracters in source code files, e.g.
French or German contributor names, not hardcoded encoding names…)

I guess I wasn't aware of that when coverting them after Lintian
warnings or so. At least I did that for many of my packages. Not sure
if I was the one who did it with aptitude, but chances are not that
low. ;-)

Thanks a lot!

Funnily
https://salsa.debian.org/apt-team/aptitude/-/merge_requests/10/diffs
doesn't really show the changes as it at least partially seems to
convert the encoding line by line. So both, old and especially new
look good. :-)

Ack. Yeah, I'm aware of it. Building with gcc 9 instead of 10 should
work, in case you're curious to see if it flies. :-)

Ack, I think so, too.

I though think we should not merge it before that FTBFS is fixed.

		Regards, Axel

#950334#24
Date:
2023-08-25 21:33:32 UTC
From:
To:
Shawn
#950334#29
Date:
2023-09-21 02:35:45 UTC
From:
To:
Shawn