Lines Matching refs:locale

4 /* Determine a canonical name for the current locale's character encoding.
56 # include <locale.h>
360 /* Determine the current locale's character encoding, and canonicalize it
385 of the locale name from the environment variables (if present) or
389 const char *locale;
392 locale = getenv ("LC_ALL");
393 if (locale == NULL || locale[0] == '\0')
395 locale = getenv ("LC_CTYPE");
396 if (locale == NULL || locale[0] == '\0')
397 locale = getenv ("LANG");
399 if (locale != NULL && locale[0] != '\0')
401 /* If the locale name contains an encoding after the dot, return
403 const char *dot = strchr (locale, '.');
423 /* Woe32 has a function returning the locale's codepage as a number:
442 const char *locale = NULL;
445 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
447 locale name the user has set. */
449 locale = setlocale (LC_CTYPE, NULL);
451 if (locale == NULL || locale[0] == '\0')
453 locale = getenv ("LC_ALL");
454 if (locale == NULL || locale[0] == '\0')
456 locale = getenv ("LC_CTYPE");
457 if (locale == NULL || locale[0] == '\0')
458 locale = getenv ("LANG");
462 /* On some old systems, one used to set locale = "iso8859_1". On others,
465 codeset = locale;
473 /* Woe32 has a function returning the locale's codepage as a number:
485 const char *locale;
492 locale = getenv ("LC_ALL");
493 if (locale == NULL || locale[0] == '\0')
495 locale = getenv ("LC_CTYPE");
496 if (locale == NULL || locale[0] == '\0')
497 locale = getenv ("LANG");
499 if (locale != NULL && locale[0] != '\0')
501 /* If the locale name contains an encoding after the dot, return it. */
502 const char *dot = strchr (locale, '.');
522 codeset = locale;
526 /* OS/2 has a function returning the locale's codepage as a number. */
554 the empty string as denoting "the locale's character encoding",