Lines Matching refs:locale

1 /* Determine a canonical name for the current locale's character encoding.
46 # include <locale.h>
277 /* Determine the current locale's character encoding, and canonicalize it
302 of the locale name from the environment variables (if present) or
306 const char *locale;
309 locale = getenv ("LC_ALL");
310 if (locale == NULL || locale[0] == '\0')
312 locale = getenv ("LC_CTYPE");
313 if (locale == NULL || locale[0] == '\0')
314 locale = getenv ("LANG");
316 if (locale != NULL && locale[0] != '\0')
318 /* If the locale name contains an encoding after the dot, return
320 const char *dot = strchr (locale, '.');
340 /* Woe32 has a function returning the locale's codepage as a number. */
349 const char *locale = NULL;
352 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
354 locale name the user has set. */
356 locale = setlocale (LC_CTYPE, NULL);
358 if (locale == NULL || locale[0] == '\0')
360 locale = getenv ("LC_ALL");
361 if (locale == NULL || locale[0] == '\0')
363 locale = getenv ("LC_CTYPE");
364 if (locale == NULL || locale[0] == '\0')
365 locale = getenv ("LANG");
369 /* On some old systems, one used to set locale = "iso8859_1". On others,
372 codeset = locale;
380 /* Woe32 has a function returning the locale's codepage as a number. */
386 const char *locale;
393 locale = getenv ("LC_ALL");
394 if (locale == NULL || locale[0] == '\0')
396 locale = getenv ("LC_CTYPE");
397 if (locale == NULL || locale[0] == '\0')
398 locale = getenv ("LANG");
400 if (locale != NULL && locale[0] != '\0')
402 /* If the locale name contains an encoding after the dot, return it. */
403 const char *dot = strchr (locale, '.');
423 codeset = locale;
427 /* OS/2 has a function returning the locale's codepage as a number. */
455 the empty string as denoting "the locale's character encoding",