Acknowledgement sent
to Marco Bodrato <[email protected]>:
New Bug report received and forwarded. Copy sent to Marius Gripsgard <[email protected]>.
(Fri, 10 Jun 2022 09:51:04 GMT) (full text, mbox, link).
Subject: btop: Problems with rounding and locale when the string must be
short. E.g. "1.87 GiB" -> " 1,0G"
Date: Fri, 10 Jun 2022 11:42:14 +0200
Package: btop
Version: 1.2.7-1
Severity: minor
Dear Maintainer,
the use of locale by the program is not fully consistent.
The line "Load AVG:" is correct. I.e.:
$ LANG=C btop --utf-force
prints "Load AVG: 0.43 0.54 0.70" with dots ".";
$ LANG=eo btop --utf-force
prints "Load AVG: 0,43 0,54 0,70", the same with commas ",".
Correct.
The size of memory or disks does not respect locale. E.g.:
$ LANG=C btop --utf-force
prints "72.9 Mi" or "1.86 GiB" with dots ".";
$ LANG=eo btop --utf-force
also prints "72.9 Mi" or "1.86 GiB", again with dots ".",
it should be with commas ",".
But the more important issue arises when the terminal size is small
and the program uses shorter forms. E.g.:
$ LANG=eo btop --utf-force
with a large terminal size prints "1.86 GiB", with dot;
the same value, with a small terminal size is printed as "1,0G",
with comma.
The problem is the digit: ",0" instead of ",9".
With LANG=C the program correctly prints "1.9G".
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.17.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=eo, LC_CTYPE=eo (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages btop depends on:
ii libc6 2.33-7
ii libgcc-s1 12.1.0-2
ii libstdc++6 12.1.0-2
btop recommends no packages.
btop suggests no packages.
-- no debconf information
Ĝis,
m
--
http://bodrato.it/papers/
Acknowledgement sent
to Otto Kekäläinen <[email protected]>:
Extra info received and forwarded to list. Copy sent to Marius Gripsgard <[email protected]>.
(Tue, 05 Mar 2024 05:48:03 GMT) (full text, mbox, link).
Subject: btop: Problems with rounding and locale when the string must be
short. E.g. "1.87 GiB" -> " 1,0G"
Date: Mon, 4 Mar 2024 21:44:41 -0800
Hi Marco!
Thanks for reporting
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012611 in Debian.
The bug you describe is not due to anything in the Debian packaging,
but most likely a common bug for upstream
https://github.com/aristocratos/btop.
Do you have experience in C++ development? Do you want to take a stab
in the open source spirit to fix this issue yourself?
This command-line tool is pretty simple, and building and rebuilding
it yourself while testing that your changes work is relatively trivial
if you have any C background.
If you end up submitting a PR upstream, please mark this Debian bug as
"Forwarded".