Lines Matching refs:locale

3 /* Determine a canonical name for the current locale's character encoding.
55 # include <locale.h>
351 /* Determine the current locale's character encoding, and canonicalize it
375 returns "US-ASCII". Return the suffix of the locale name from the
379 const char *locale;
382 locale = getenv ("LC_ALL");
383 if (locale == NULL || locale[0] == '\0')
385 locale = getenv ("LC_CTYPE");
386 if (locale == NULL || locale[0] == '\0')
387 locale = getenv ("LANG");
389 if (locale != NULL && locale[0] != '\0')
391 /* If the locale name contains an encoding after the dot, return
393 const char *dot = strchr (locale, '.');
413 /* Woe32 has a function returning the locale's codepage as a number:
432 const char *locale = NULL;
435 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
437 locale name the user has set. */
439 locale = setlocale (LC_CTYPE, NULL);
441 if (locale == NULL || locale[0] == '\0')
443 locale = getenv ("LC_ALL");
444 if (locale == NULL || locale[0] == '\0')
446 locale = getenv ("LC_CTYPE");
447 if (locale == NULL || locale[0] == '\0')
448 locale = getenv ("LANG");
452 /* On some old systems, one used to set locale = "iso8859_1". On others,
455 codeset = locale;
463 /* Woe32 has a function returning the locale's codepage as a number:
475 const char *locale;
482 locale = getenv ("LC_ALL");
483 if (locale == NULL || locale[0] == '\0')
485 locale = getenv ("LC_CTYPE");
486 if (locale == NULL || locale[0] == '\0')
487 locale = getenv ("LANG");
489 if (locale != NULL && locale[0] != '\0')
491 /* If the locale name contains an encoding after the dot, return it. */
492 const char *dot = strchr (locale, '.');
512 codeset = locale;
516 /* OS/2 has a function returning the locale's codepage as a number. */
544 the empty string as denoting "the locale's character encoding",