Lines Matching refs:locale
1 /* Determine a canonical name for the current locale's character encoding.
58 # include <locale.h>
261 /* Determine the current locale's character encoding, and canonicalize it
286 const char *locale = NULL;
289 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
291 locale name the user has set. */
293 locale = setlocale (LC_CTYPE, NULL);
295 if (locale == NULL || locale[0] == '\0')
297 locale = getenv ("LC_ALL");
298 if (locale == NULL || locale[0] == '\0')
300 locale = getenv ("LC_CTYPE");
301 if (locale == NULL || locale[0] == '\0')
302 locale = getenv ("LANG");
306 /* On some old systems, one used to set locale = "iso8859_1". On others,
309 codeset = locale;
317 /* Woe32 has a function returning the locale's codepage as a number. */
323 const char *locale;
330 locale = getenv ("LC_ALL");
331 if (locale == NULL || locale[0] == '\0')
333 locale = getenv ("LC_CTYPE");
334 if (locale == NULL || locale[0] == '\0')
335 locale = getenv ("LANG");
337 if (locale != NULL && locale[0] != '\0')
339 /* If the locale name contains an encoding after the dot, return it. */
340 const char *dot = strchr (locale, '.');
360 codeset = locale;
364 /* OS/2 has a function returning the locale's codepage as a number. */
392 the empty string as denoting "the locale's character encoding",