1gnutls_idna_map(3) gnutls gnutls_idna_map(3)
2
3
4
6 gnutls_idna_map - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_idna_map(const char * input, unsigned ilen, gnutls_datum_t *
12 out, unsigned flags);
13
15 const char * input
16 contain the UTF-8 formatted domain name
17
18 unsigned ilen
19 the length of the provided string
20
21 gnutls_datum_t * out
22 the result in an null-terminated allocated string
23
24 unsigned flags
25 should be zero
26
28 This function will convert the provided UTF-8 domain name, to its IDNA
29 mapping in an allocated variable. Note that depending on the flags the
30 used gnutls library was compiled with, the output of this function may
31 vary (i.e., may be IDNA2008, or IDNA2003).
32
33 To force IDNA2008 specify the flag GNUTLS_IDNA_FORCE_2008. In the case
34 GnuTLS is not compiled with the necessary dependencies, GNUTLS_E_UNIM‐
35 PLEMENTED_FEATURE will be returned to indicate that gnutls is unable to
36 perform the requested conversion.
37
38 Note also, that this function will return an empty string if an empty
39 string is provided as input.
40
42 GNUTLS_E_INVALID_UTF8_STRING on invalid UTF-8 data, or 0 on success.
43
45 3.5.8
46
48 Report bugs to <bugs@gnutls.org>.
49 Home page: http://www.gnutls.org
50
51
53 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
54 Copying and distribution of this file, with or without modification,
55 are permitted in any medium without royalty provided the copyright
56 notice and this notice are preserved.
57
59 The full documentation for gnutls is maintained as a Texinfo manual.
60 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
61 visit
62
63 http://www.gnutls.org/manual/
64
65gnutls 3.6.5 gnutls_idna_map(3)