commit bash-20101124 snapshot

This commit is contained in:
Chet Ramey
2011-12-12 22:10:33 -05:00
parent 18d2df9102
commit adc6cff53c
69 changed files with 14151 additions and 780 deletions
+8 -3
View File
@@ -64,14 +64,19 @@ static iconv_t localconv;
static char *
stub_charset ()
{
char *locale, *s;
char *locale, *s, *t;
locale = get_locale_var ("LC_CTYPE");
if (locale == 0)
if (locale == 0 || *locale == 0)
return "ASCII";
s = strrchr (locale, '.');
if (s)
return ++s;
{
t = strchr (s, '@');
if (t)
*t = 0;
return ++s;
}
else if (STREQ (locale, "UTF-8"))
return "UTF-8";
else