diff options
Diffstat (limited to 'src/mbyte.c')
-rw-r--r-- | src/mbyte.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index f3092556d..89b53c2e5 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -2871,12 +2871,16 @@ enc_locale() # ifdef HAVE_NL_LANGINFO_CODESET if ((s = nl_langinfo(CODESET)) == NULL || *s == NUL) # endif -# if defined(HAVE_LOCALE_H) || defined(X_LOCALE) +# ifdef MACOS + s = "utf-8"; +# else +# if defined(HAVE_LOCALE_H) || defined(X_LOCALE) if ((s = setlocale(LC_CTYPE, NULL)) == NULL || *s == NUL) -# endif +# endif if ((s = getenv("LC_ALL")) == NULL || *s == NUL) if ((s = getenv("LC_CTYPE")) == NULL || *s == NUL) s = getenv("LANG"); +# endif if (s == NULL || *s == NUL) return FAIL; @@ -5578,6 +5582,7 @@ convert_setup(vcp, from, to) # endif if (vcp->vc_type == CONV_NONE) return FAIL; + return OK; } |