ngrep-1.45-setlocale.patch 526 B

123456789101112131415161718192021222324
  1. Call setlocale to make isprint() decide what's printable depending
  2. on the current locale. See bugs.debian.org/307496 .
  3. --- ngrep-1.45.ds1.orig/ngrep.c
  4. +++ ngrep-1.45.ds1/ngrep.c
  5. @@ -97,6 +97,8 @@
  6. #include "regex-0.12/regex.h"
  7. #endif
  8. +#include <locale.h>
  9. +
  10. #include "ngrep.h"
  11. @@ -195,6 +197,8 @@
  12. signal(SIGWINCH, update_windowsize);
  13. #endif
  14. + setlocale(LC_ALL, "");
  15. +
  16. while ((c = getopt(argc, argv, "LNhXViwqpevxlDtTRMs:n:c:d:A:I:O:S:P:F:W:")) != EOF) {
  17. switch (c) {
  18. case 'W': {