Home | History | Annotate | Download | only in intl

Lines Matching refs:locale

1 /* Determine a canonical name for the current locale's character encoding.
58 # include <locale.h>
260 /* Determine the current locale's character encoding, and canonicalize it
285 const char *locale = NULL;
288 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
290 locale name the user has set. */
292 locale = setlocale (LC_CTYPE, NULL);
294 if (locale == NULL || locale[0] == '\0')
296 locale = getenv ("LC_ALL");
297 if (locale == NULL || locale[0] == '\0')
299 locale = getenv ("LC_CTYPE");
300 if (locale == NULL || locale[0] == '\0')
301 locale = getenv ("LANG");
305 /* On some old systems, one used to set locale = "iso8859_1". On others,
308 codeset = locale;
316 /* Woe32 has a function returning the locale's codepage as a number. */
322 const char *locale;
329 locale = getenv ("LC_ALL");
330 if (locale == NULL || locale[0] == '\0')
332 locale = getenv ("LC_CTYPE");
333 if (locale == NULL || locale[0] == '\0')
334 locale = getenv ("LANG");
336 if (locale != NULL && locale[0] != '\0')
338 /* If the locale name contains an encoding after the dot, return it. */
339 const char *dot = strchr (locale, '.');
359 codeset = locale;
363 /* OS/2 has a function returning the locale's codepage as a number. */
391 the empty string as denoting "the locale's character encoding",