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, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Simon
41 Josefsson.
42 Copying and distribution of this file, with or without modification,
43 are permitted in any medium without royalty provided the copyright
44 notice and this notice are preserved.
45
47 The full documentation for libidn is maintained as a Texinfo manual.
48 If the info and libidn programs are properly installed at your site,
49 the command
50
51 info libidn
52
53 should give you access to the complete manual.
54
55
56
57libidn 1.18 stringprep_locale_charset(3)