Lines Matching refs:locale

1 /* Determine a canonical name for the current locale's character encoding.
45 # include <locale.h>
276 /* Determine the current locale's character encoding, and canonicalize it
301 of the locale name from the environment variables (if present) or
305 const char *locale;
308 locale = getenv ("LC_ALL");
309 if (locale == NULL || locale[0] == '\0')
311 locale = getenv ("LC_CTYPE");
312 if (locale == NULL || locale[0] == '\0')
313 locale = getenv ("LANG");
315 if (locale != NULL && locale[0] != '\0')
317 /* If the locale name contains an encoding after the dot, return
319 const char *dot = strchr (locale, '.');
339 /* Woe32 has a function returning the locale's codepage as a number. */
348 const char *locale = NULL;
351 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
353 locale name the user has set. */
355 locale = setlocale (LC_CTYPE, NULL);
357 if (locale == NULL || locale[0] == '\0')
359 locale = getenv ("LC_ALL");
360 if (locale == NULL || locale[0] == '\0')
362 locale = getenv ("LC_CTYPE");
363 if (locale == NULL || locale[0] == '\0')
364 locale = getenv ("LANG");
368 /* On some old systems, one used to set locale = "iso8859_1". On others,
371 codeset = locale;
379 /* Woe32 has a function returning the locale's codepage as a number. */
385 const char *locale;
392 locale = getenv ("LC_ALL");
393 if (locale == NULL || locale[0] == '\0')
395 locale = getenv ("LC_CTYPE");
396 if (locale == NULL || locale[0] == '\0')
397 locale = getenv ("LANG");
399 if (locale != NULL && locale[0] != '\0')
401 /* If the locale name contains an encoding after the dot, return it. */
402 const char *dot = strchr (locale, '.');
422 codeset = locale;
426 /* OS/2 has a function returning the locale's codepage as a number. */
454 the empty string as denoting "the locale's character encoding",