bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] Usage help text not properly aligned on multi-byte terminal


From: Petr Pisar
Subject: [Bug-tar] Usage help text not properly aligned on multi-byte terminal
Date: Mon, 14 Sep 2009 14:33:13 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hello,

updating Czech translation of tar, I hit following problem: The
well-structured usage text printed on `tar --help' is not properly aligned
when running on multi-byte (UTF-8) terminal:

  -n, --seek                 v archivu se lze posunovat
      --no-check-device      při vytváření přírůstkových archivů se
                             nekontrolují čísla zařízení
      --occurrence[=ČÍSLO] zpracuje pouze ČÍSLO. výskyt každého souboru
                             z archivu; tento přepínač je platný jen ve
                             spojení s jedním z podpříkazů --delete,
                             --diff, --extract nebo --list a jen když je
                             zadán seznam souborů na příkazovém řádku
                             nebo přes přepínač -T; implicitní ČÍSLO je
                             1

Here you can that the first line of --occurrence option is shifted to left
because translated option argument `ČÍSLO' (NUMBER in English) contains
characters that have more bytes per character than one in UTF-8 locale.

This is caused by functions in lib/argp-fmtstream.c that operates on char type
which counts bytes (on my platform with my compiler) instead of wide
characters. Wrong count of spaces to fill is computed as consequence.

Also line wrapping suffers from similar problem. (Lines are wrapped sooner
than necessary.)

I verified this behaviour with tar-1.22 in LANG=cs_CZ.UTF-8 enviroment with
not yet published Czech translation (I will publish updated catalog as soon as
I get write access into tar domain in the Translation Project). I think this
bug can be demonstrated with any other language using characters from higher
Unicode planes in UTF-8 terminal.

-- Petr

Attachment: pgpUSjcYuvHQV.pgp
Description: PGP signature


reply via email to

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