summaryrefslogtreecommitdiff
path: root/iftop.c
diff options
context:
space:
mode:
authorpdw <>2011-10-03 21:55:33 +0000
committerpdw <>2011-10-03 21:55:33 +0000
commitac177644c3dc3a08cc2e17e7555781f886be42f4 (patch)
tree004aa390b63578fbddee8dc769309465b99bf1bd /iftop.c
parent4ef2265377ce6764ce466076e4a3433170daf8ce (diff)
downloadiftop-ac177644c3dc3a08cc2e17e7555781f886be42f4.zip
Patch by Robert Scheck <robert@fedoraproject.org> for iftop >= 0.17, which works
around a PuTTY issue (doesn't honor vt100 line-drawing when in UTF-8 mode) to get sane lines drawn instead of letters. When using PuTTY in UTF-8 mode, you have to execute "NCURSES_NO_UTF8_ACS=1 iftop" in the future. Technically, relinking from curses to ncursesw is just half of the solution, calling setlocale() is the rest. For further information, please have a look to Red Hat Bugzilla, bug ID #546032: https://bugzilla.redhat.com/show_bug.cgi?id=546032
Diffstat (limited to 'iftop.c')
-rw-r--r--iftop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/iftop.c b/iftop.c
index 43329f8..0d46fc5 100644
--- a/iftop.c
+++ b/iftop.c
@@ -27,6 +27,7 @@
#include <signal.h>
#include <string.h>
#include <unistd.h>
+#include <locale.h>
#include "iftop.h"
#include "addr_hash.h"
@@ -763,6 +764,8 @@ int main(int argc, char **argv) {
pthread_t thread;
struct sigaction sa = {};
+ setlocale(LC_ALL, "");
+
/* TODO: tidy this up */
/* read command line options and config file */
config_init();