Lines Matching refs:locale
3 /* Determine a canonical name for the current locale's character encoding.
53 # include <locale.h>
317 /* Determine the current locale's character encoding, and canonicalize it
342 of the locale name from the environment variables (if present) or
346 const char *locale;
349 locale = getenv ("LC_ALL");
350 if (locale == NULL || locale[0] == '\0')
352 locale = getenv ("LC_CTYPE");
353 if (locale == NULL || locale[0] == '\0')
354 locale = getenv ("LANG");
356 if (locale != NULL && locale[0] != '\0')
358 /* If the locale name contains an encoding after the dot, return
360 const char *dot = strchr (locale, '.');
380 /* Woe32 has a function returning the locale's codepage as a number. */
389 const char *locale = NULL;
392 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
394 locale name the user has set. */
396 locale = setlocale (LC_CTYPE, NULL);
398 if (locale == NULL || locale[0] == '\0')
400 locale = getenv ("LC_ALL");
401 if (locale == NULL || locale[0] == '\0')
403 locale = getenv ("LC_CTYPE");
404 if (locale == NULL || locale[0] == '\0')
405 locale = getenv ("LANG");
409 /* On some old systems, one used to set locale = "iso8859_1". On others,
412 codeset = locale;
420 /* Woe32 has a function returning the locale's codepage as a number. */
426 const char *locale;
433 locale = getenv ("LC_ALL");
434 if (locale == NULL || locale[0] == '\0')
436 locale = getenv ("LC_CTYPE");
437 if (locale == NULL || locale[0] == '\0')
438 locale = getenv ("LANG");
440 if (locale != NULL && locale[0] != '\0')
442 /* If the locale name contains an encoding after the dot, return it. */
443 const char *dot = strchr (locale, '.');
463 codeset = locale;
467 /* OS/2 has a function returning the locale's codepage as a number. */
495 the empty string as denoting "the locale's character encoding",