diff options
Diffstat (limited to 'gdb/gnulib/import/localcharset.c')
-rw-r--r-- | gdb/gnulib/import/localcharset.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gnulib/import/localcharset.c b/gdb/gnulib/import/localcharset.c index b5ee2d6..8d16c87 100644 --- a/gdb/gnulib/import/localcharset.c +++ b/gdb/gnulib/import/localcharset.c @@ -542,5 +542,12 @@ locale_charset (void) if (codeset[0] == '\0') codeset = "ASCII"; +#ifdef DARWIN7 + /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" + (the default codeset) does not work when MB_CUR_MAX is 1. */ + if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1) + codeset = "ASCII"; +#endif + return codeset; } |