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

NAME

6       stringprep_locale_charset - API function
7

SYNOPSIS

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

ARGUMENTS

14        void
15

DESCRIPTION

17       Enumerated  return codes of the TLD checking functions.  The value 0 is
18       guaranteed to always correspond to success.
19
20
21       Find out current locale charset.  The function respect the CHARSET  en‐
22       vironment  variable, but typically uses nl_langinfo(CODESET) when it is
23       supported.  It fall back on "ASCII" if CHARSET isn't set  and  nl_lang‐
24       info isn't supported or return anything.
25
26       Note  that  this  function  return the application's locale's preferred
27       charset (or thread's locale's preferred charset, if your system support
28       thread-specific  locales).   It  does not return what the system may be
29       using.  Thus, if you receive data from external sources you  cannot  in
30       general  use this function to guess what charset it is encoded in.  Use
31       stringprep_convert from the external representation  into  the  charset
32       returned by this function, to have data in the locale encoding.
33
34       Return  value: Return the character set used by the current locale.  It
35       will never return NULL, but use "ASCII" as a fallback.
36

REPORTING BUGS

38       Report bugs to <help-libidn@gnu.org>.
39       General guidelines for reporting bugs: https://www.gnu.org/gethelp/
40       GNU Libidn home page: https://www.gnu.org/software/libidn/
41
42
44       Copyright © 2002-2022 Simon Josefsson.
45       Copying and distribution of this file, with  or  without  modification,
46       are  permitted in any medium without royalty provided the copyright no‐
47       tice and this notice are preserved.
48

SEE ALSO

50       The full documentation for libidn is maintained as  a  Texinfo  manual.
51       If  the  info  and libidn programs are properly installed at your site,
52       the command
53
54              info libidn
55
56       should give you access to the complete manual.  As an  alternative  you
57       may obtain the manual from:
58
59              https://www.gnu.org/software/libidn/manual/
60
61libidn                               1.41         stringprep_locale_charset(3)
Impressum