*** src/utils.c.old Mon Jun 27 16:12:20 2005 --- src/utils.c Fri Jan 26 11:30:56 2007 *************** *** 1205,1219 **** /* Temporarily switch to the current locale */ setlocale (LC_NUMERIC, ""); lconv = localeconv (); ! cached_sep = xstrdup (lconv->thousands_sep); ! cached_grouping = xstrdup (lconv->grouping); /* Restore the locale to previous setting. */ setlocale (LC_NUMERIC, oldlocale); ! if (!*cached_sep) ! #endif /* Force separator for locales that specify no separators ("C", "hr", and probably many more.) */ cached_sep = ",", cached_grouping = "\x03"; initialized = 1; } *sep = cached_sep; --- 1205,1219 ---- /* Temporarily switch to the current locale */ setlocale (LC_NUMERIC, ""); lconv = localeconv (); ! cached_sep = lconv->thousands_sep ? xstrdup(lconv->thousands_sep) : "C"; ! cached_grouping = lconv->grouping ? xstrdup(lconv->grouping) : "\x03"; /* Restore the locale to previous setting. */ setlocale (LC_NUMERIC, oldlocale); ! #else /* Force separator for locales that specify no separators ("C", "hr", and probably many more.) */ cached_sep = ",", cached_grouping = "\x03"; + #endif initialized = 1; } *sep = cached_sep;