Lines Matching refs:locale

1 /* Determine a canonical name for the current locale's character encoding.
51 # include <locale.h>
315 /* Determine the current locale's character encoding, and canonicalize it
340 of the locale name from the environment variables (if present) or
344 const char *locale;
347 locale = getenv ("LC_ALL");
348 if (locale == NULL || locale[0] == '\0')
350 locale = getenv ("LC_CTYPE");
351 if (locale == NULL || locale[0] == '\0')
352 locale = getenv ("LANG");
354 if (locale != NULL && locale[0] != '\0')
356 /* If the locale name contains an encoding after the dot, return
358 const char *dot = strchr (locale, '.');
378 /* Woe32 has a function returning the locale's codepage as a number. */
387 const char *locale = NULL;
390 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
392 locale name the user has set. */
394 locale = setlocale (LC_CTYPE, NULL);
396 if (locale == NULL || locale[0] == '\0')
398 locale = getenv ("LC_ALL");
399 if (locale == NULL || locale[0] == '\0')
401 locale = getenv ("LC_CTYPE");
402 if (locale == NULL || locale[0] == '\0')
403 locale = getenv ("LANG");
407 /* On some old systems, one used to set locale = "iso8859_1". On others,
410 codeset = locale;
418 /* Woe32 has a function returning the locale's codepage as a number. */
424 const char *locale;
431 locale = getenv ("LC_ALL");
432 if (locale == NULL || locale[0] == '\0')
434 locale = getenv ("LC_CTYPE");
435 if (locale == NULL || locale[0] == '\0')
436 locale = getenv ("LANG");
438 if (locale != NULL && locale[0] != '\0')
440 /* If the locale name contains an encoding after the dot, return it. */
441 const char *dot = strchr (locale, '.');
461 codeset = locale;
465 /* OS/2 has a function returning the locale's codepage as a number. */
493 the empty string as denoting "the locale's character encoding",