bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

argp --help formatting bug with non-ASCII characters


From: Bruno Haible
Subject: argp --help formatting bug with non-ASCII characters
Date: Fri, 12 Apr 2024 01:23:49 +0200

Reported by Lasse Collin:
The argp module from Gnulib has a rendering problem in the --help output
of the program. Namely, it counts bytes when it should count screen columns.

How to reproduce:
1. Build GNU tar (1.33 or 1.35, for example).
2. Install it.
3. You can see misindentation:
$ LC_ALL=de_DE.UTF-8 src/tar --help

...
                             abzubilden
      --mode=ÄNDERUNGEN     den (symbolischen) Modus ÄNDERUNGEN für
                             hinzugefügte Dateien erzwingen
...

$ LC_ALL=fr_FR.UTF-8 src/tar --help
...
                             son nom commence par un tiret)
  -C, --directory=RÉP       Utiliser RÉP comme répertoire de travail
      --exclude=MOTIF        Exclure les fichiers correspondant au MOTIF
...

The .mo file produces separate localizations for the pieces, e.g. "ÄNDERUNGEN"
and "den (symbolischen) Modus ÄNDERUNGEN für hinzugefügte Dateien erzwingen".

The bug is apparently that in argp-fmtstream.c, a character such as Ä or É
augments fs->point_col by 2, when it should only augment it by 1.

In other words, it should use the Gnulib module 'mbswidth'.

Any volunteers?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]