Lines Matching refs:locale

1 /* Determine a canonical name for the current locale's character encoding.
53 # include <locale.h>
349 /* Determine the current locale's character encoding, and canonicalize it
373 returns "US-ASCII". Return the suffix of the locale name from the
377 const char *locale;
380 locale = getenv ("LC_ALL");
381 if (locale == NULL || locale[0] == '\0')
383 locale = getenv ("LC_CTYPE");
384 if (locale == NULL || locale[0] == '\0')
385 locale = getenv ("LANG");
387 if (locale != NULL && locale[0] != '\0')
389 /* If the locale name contains an encoding after the dot, return
391 const char *dot = strchr (locale, '.');
411 /* Woe32 has a function returning the locale's codepage as a number:
430 const char *locale = NULL;
433 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
435 locale name the user has set. */
437 locale = setlocale (LC_CTYPE, NULL);
439 if (locale == NULL || locale[0] == '\0')
441 locale = getenv ("LC_ALL");
442 if (locale == NULL || locale[0] == '\0')
444 locale = getenv ("LC_CTYPE");
445 if (locale == NULL || locale[0] == '\0')
446 locale = getenv ("LANG");
450 /* On some old systems, one used to set locale = "iso8859_1". On others,
453 codeset = locale;
461 /* Woe32 has a function returning the locale's codepage as a number:
473 const char *locale;
480 locale = getenv ("LC_ALL");
481 if (locale == NULL || locale[0] == '\0')
483 locale = getenv ("LC_CTYPE");
484 if (locale == NULL || locale[0] == '\0')
485 locale = getenv ("LANG");
487 if (locale != NULL && locale[0] != '\0')
489 /* If the locale name contains an encoding after the dot, return it. */
490 const char *dot = strchr (locale, '.');
510 codeset = locale;
514 /* OS/2 has a function returning the locale's codepage as a number. */
542 the empty string as denoting "the locale's character encoding",