btop: [BUG] Radix separator is varyingly a comma or a period

Read the README.md and search for similar issues before posting a bug report!

Any bug that can be solved by just reading the prerequisites section of the README will likely be ignored.

Describe the bug

In the mem, disks, and net sections of btop, a comma is now used as the radix symbol, though it used to be a period. This would be fine (if not personally preferable), but the cpu, gpu, and bat information still uses a period

To Reproduce

Formatting error–Just run btop

Expected behavior

Consistent separator. Either European-styled (with a comma) or North American (with a period)

Screenshots

Image

Info (please complete the following information):

  • btop++ version: 1.4.3+1c2ab3f
  • Binary: self-compiled
  • Architecture: x86_64
  • Platform: Linux
  • (Linux) Kernel: 6.15.3-arch1-1
  • Terminal used: WezTerm (20250622-064717-2b656cb5)
  • Font used: idk

Additional context

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 9
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Should be fixed as of commit 86ec5fd We now exclusively use dots as decimal points regardless of the system locale.

Seems to be issues with some std functions to get the correct decimal symbol and the fmt library don’t seem to recognize the locale at all.

For example while using a swedish system locale:

to_string(1.2) = 1,2 fmt::format("{:.1f}", 1.2) = 1.2 fmt::format("{:.1L}", 1.2) = 1 and std::use_facet<std::numpunct<char>>(std::locale()).decimal_point()) is empty…

I think static const string num_delim = string(1, std::use_facet<std::numpunct<char>>(std::locale()).thousands_sep()); should be static const string num_delim = string(1, std::use_facet<std::numpunct<char>>(std::locale()).decimal_point());.

@davised Try running LC_NUMERIC=en_US.UTF-8 btop and see if that changes it to dots.

@aristocratos, this does not work for me, when I tried it. I am running the same version as I was when I raised the issue: 1.4.3+1c2ab3f