1stringprep_locale_charset(3) libidn stringprep_locale_charset(3)
2
3
4
6 stringprep_locale_charset - API function
7
9 #include <stringprep.h>
10
11 const char * stringprep_locale_charset( void);
12
14 void
15
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
31 Return the character set used by the current locale. It will never
32 return NULL, but use "ASCII" as a fallback.
33
35 Report bugs to <bug-libidn@gnu.org>. GNU Libidn home page:
36 http://www.gnu.org/software/libidn/ General help using GNU software:
37 http://www.gnu.org/gethelp/
38
40 Copyright © 2002-2013 Simon Josefsson.
41 Copying and distribution of this file, with or without modification,
42 are permitted in any medium without royalty provided the copyright
43 notice and this notice are preserved.
44
46 The full documentation for libidn is maintained as a Texinfo manual.
47 If the info and libidn programs are properly installed at your site,
48 the command
49
50 info libidn
51
52 should give you access to the complete manual.
53
54
55
56libidn 1.28 stringprep_locale_charset(3)