Hi,
  I've just encountered this problem too, and I think the problem is that 
vnstat is not calling setlocale with the empty string argument to set the 
locale from the environment (see 
http://www.gnu.org/software/libc/manual/html_node/Setting-the-Locale.html)

  A quick patch to fix it:

--- vnstat.c.old        2011-05-31 23:29:51.000000000 +0100
+++ vnstat.c    2013-08-06 07:55:16.000000000 +0100
@@ -72,6 +72,8 @@
        } else {
                if (getenv("LC_ALL")) {
                        setlocale(LC_ALL, getenv("LC_ALL"));
+               } else {
+                       setlocale(LC_ALL, "");
                }
        }
        strncpy(interface, "default", 32);


I think the same thing is happening in vnstati.c. I've created a similar patch, 
but I haven't tested this one (I haven't used vnstati yet)

--- vnstati.c.old       2011-05-31 23:29:51.000000000 +0100
+++ vnstati.c   2013-08-06 08:20:53.000000000 +0100
@@ -65,6 +65,8 @@
        } else {
                if (getenv("LC_ALL")) {
                        setlocale(LC_ALL, getenv("LC_ALL"));
+               } else {
+                       setlocale(LC_ALL, "");
                }
        }
        strncpy(interface, cfg.iface, 32);


(I am in no way a locale expert, but I think the calls to setlocale(LC_ALL, 
getenv("LC_ALL")) should probably be removed)

  Hope this helps,
    Osric.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to