]> sjero.net Git - wget/blobdiff - src/utils.c
Deal with progress bars in environs lacking mbtowc or wcwidth.
[wget] / src / utils.c
index 5be8ddcf607f4263d272f47cbfaae9a78b3ca843..920f3b54482f0232c4a26b62e988e19a516686e2 100644 (file)
@@ -1221,6 +1221,12 @@ get_grouping_data (const char **sep, const char **grouping)
       struct lconv *lconv = localeconv ();
       cached_sep = lconv->thousands_sep;
       cached_grouping = lconv->grouping;
+#if ! USE_NLS_PROGRESS_BAR
+      /* We can't count column widths, so ensure that the separator
+       * is single-byte only (let check below determine what byte). */
+      if (strlen(cached_sep) > 1)
+        cached_sep = "";
+#endif
       if (!*cached_sep)
         {
           /* Many locales (such as "C" or "hr_HR") don't specify