MCPcopy Create free account
hub / github.com/git/git / is_utf8_locale

Function is_utf8_locale

gettext.c:142–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140#endif
141
142int is_utf8_locale(void)
143{
144#ifdef NO_GETTEXT
145 if (!charset) {
146 const char *env = getenv("LC_ALL");
147 if (!env || !*env)
148 env = getenv("LC_CTYPE");
149 if (!env || !*env)
150 env = getenv("LANG");
151 if (!env)
152 env = "";
153 if (strchr(env, '.'))
154 env = strchr(env, '.') + 1;
155 charset = xstrdup(env);
156 }
157#endif
158 return is_encoding_utf8(charset);
159}

Callers 2

gettext_widthFunction · 0.85
compile_pcre2_patternFunction · 0.85

Calls 2

xstrdupFunction · 0.85
is_encoding_utf8Function · 0.85

Tested by

no test coverage detected