1stringprep_locale_charset(3)        libidn        stringprep_locale_charset(3)
2
3
4

NAME

6       stringprep_locale_charset - return charset used in current locale
7

SYNOPSIS

9       #include <stringprep.h>
10
11       const char * stringprep_locale_charset( void);
12

ARGUMENTS

14        void
15

DESCRIPTION

17       Find  out  current  locale  charset.   The function respect the CHARSET
18       environment variable, but typically uses nl_langinfo(CODESET)  when  it
19       is  supported.   It  fall  back  on  "ASCII"  if  CHARSET isn't set and
20       nl_langinfo isn't supported or return anything.
21
22       Note that this function return  the  application's  locale's  preferred
23       charset (or thread's locale's preffered charset, if your system support
24       thread-specific locales).  It does not return what the  system  may  be
25       using.   Thus,  if you receive data from external sources you cannot in
26       general use this function to guess what charset it is encoded in.   Use
27       stringprep_convert  from  the  external representation into the charset
28       returned by this function, to have data in the locale encoding.
29

RETURN VALUE

31       Return the character set used by the current  locale.   It  will  never
32       return NULL, but use "ASCII" as a fallback.
33

REPORTING BUGS

35       Report bugs to <bug-libidn@gnu.org>.
36
38       Copyright © 2002, 2003, 2004, 2005, 2006 Simon Josefsson.
39       Permission  is  granted  to make and distribute verbatim copies of this
40       manual provided the copyright notice and  this  permission  notice  are
41       preserved on all copies.
42

SEE ALSO

44       The  full  documentation  for libidn is maintained as a Texinfo manual.
45       If the info and libidn programs are properly installed  at  your  site,
46       the command
47
48              info libidn
49
50       should give you access to the complete manual.
51
52
53
54libidn                               0.6.8        stringprep_locale_charset(3)
Impressum