We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff2ea39 + 090d1e8 commit 0328db0Copy full SHA for 0328db0
gettext.c
@@ -12,7 +12,25 @@
12
#ifndef NO_GETTEXT
13
# include <locale.h>
14
# include <libintl.h>
15
-# ifdef HAVE_LIBCHARSET_H
+# ifdef GIT_WINDOWS_NATIVE
16
+
17
+static const char *locale_charset(void)
18
+{
19
+ const char *env = getenv("LC_ALL"), *dot;
20
21
+ if (!env || !*env)
22
+ env = getenv("LC_CTYPE");
23
24
+ env = getenv("LANG");
25
26
+ if (!env)
27
+ return "UTF-8";
28
29
+ dot = strchr(env, '.');
30
+ return !dot ? env : dot + 1;
31
+}
32
33
+# elif defined HAVE_LIBCHARSET_H
34
# include <libcharset.h>
35
# else
36
# include <langinfo.h>
0 commit comments