summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-02-22 08:39:57 +0000
committerBram Moolenaar <Bram@vim.org>2005-02-22 08:39:57 +0000
commitdf177f679e950a2ab2ad5fe7d45c1daface004d7 (patch)
tree21c0c50e9144ef873af675daf53b86beb26dd677 /src/mbyte.c
parent6bdcfc08cb9c192972336e28a2a842b7abbb2811 (diff)
downloadvim-git-df177f679e950a2ab2ad5fe7d45c1daface004d7.tar.gz
updated for version 7.0051
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c9
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;
}