Home | History | Annotate | Download | only in lib

Lines Matching refs:locale

1 /* Determine a canonical name for the current locale's character encoding.
52 # include <locale.h>
347 /* Determine the current locale's character encoding, and canonicalize it
371 returns "US-ASCII". Return the suffix of the locale name from the
375 const char *locale;
378 locale = getenv ("LC_ALL");
379 if (locale == NULL || locale[0] == '\0')
381 locale = getenv ("LC_CTYPE");
382 if (locale == NULL || locale[0] == '\0')
383 locale = getenv ("LANG");
385 if (locale != NULL && locale[0] != '\0')
387 /* If the locale name contains an encoding after the dot, return
389 const char *dot = strchr (locale, '.');
409 /* The Windows API has a function returning the locale's codepage as a
428 const char *locale = NULL;
431 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
433 locale name the user has set. */
435 locale = setlocale (LC_CTYPE, NULL);
437 if (locale == NULL || locale[0] == '\0')
439 locale = getenv ("LC_ALL");
440 if (locale == NULL || locale[0] == '\0')
442 locale = getenv ("LC_CTYPE");
443 if (locale == NULL || locale[0] == '\0')
444 locale = getenv ("LANG");
448 /* On some old systems, one used to set locale = "iso8859_1". On others,
451 codeset = locale;
459 /* The Windows API has a function returning the locale's codepage as a
471 const char *locale;
478 locale = getenv ("LC_ALL");
479 if (locale == NULL || locale[0] == '\0')
481 locale = getenv ("LC_CTYPE");
482 if (locale == NULL || locale[0] == '\0')
483 locale = getenv ("LANG");
485 if (locale != NULL && locale[0] != '\0')
487 /* If the locale name contains an encoding after the dot, return it. */
488 locale, '.');
508 codeset = locale;
512 /* OS/2 has a function returning the locale's codepage as a number. */
540 the empty string as denoting "the locale's character encoding",