Re: [dev] [wmii] Locale problem with "uptime" (loadavg in status bar) and a suggestion

From: Robert Ransom <>
Date: Thu, 15 Jul 2010 00:00:51 -0700

On Wed, 14 Jul 2010 14:08:32 +0200
nico <> wrote:

> Hello there,
> i changed my systems locales to de_DE.UTF-8 and now the command "uptime"
> is using "," instead of "." because of LC_NUMERIC now being set to German
> too. As a result of this the loadavg part of the default statusbar looks
> like "131 087 071" (no dots since commas are removed by sed).
> I have tried several things to make it work but I was not sucessful.
> LC_NUMERIC _must_ be exported to make it work correctly, since uptime is
> called from a subshell. Exporting LC_NUMERIC to an English locale is not an
> option.
> Now, I don't know how to make that status command respecting a different
> locale.

Setting LC_NUMERIC is the only way I can think of. But you don't need
that status command.

On Linux (and many other versions):

$ cat /proc/loadavg

(I assume the kernel doesn't try to read and act on locale environment
variables. Yet.)

On FreeBSD 8.0-RELEASE-p? (and probably other versions), see

Robert Ransom

Received on Thu Jul 15 2010 - 09:00:51 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 15 2010 - 09:12:02 CEST