1stringprep_ucs4_to_utf8(3) libidn stringprep_ucs4_to_utf8(3)
2
3
4
6 stringprep_ucs4_to_utf8 - API function
7
9 #include <stringprep.h>
10
11 char * stringprep_ucs4_to_utf8(const uint32_t * str, ssize_t len,
12 size_t * items_read, size_t * items_written);
13
15 const uint32_t * str
16 a UCS-4 encoded string
17
18 ssize_t len the maximum length of str to use. If len < 0, then the
19 string is terminated with a 0 character.
20
21 size_t * items_read
22 location to store number of characters read read, or NULL.
23
24 size_t * items_written
25 location to store number of bytes written or NULL. The
26 value here stored does not include the trailing 0 byte.
27
29 Convert a string from a 32-bit fixed width representation as UCS-4. to
30 UTF-8. The result will be terminated with a 0 byte.
31
32 Return value: a pointer to a newly allocated UTF-8 string. This value
33 must be deallocated by the caller. If an error occurs, NULL will be
34 returned.
35
37 Report bugs to <help-libidn@gnu.org>.
38 General guidelines for reporting bugs: https://www.gnu.org/gethelp/
39 GNU Libidn home page: https://www.gnu.org/software/libidn/
40
41
43 Copyright © 2002-2022 Simon Josefsson.
44 Copying and distribution of this file, with or without modification,
45 are permitted in any medium without royalty provided the copyright no‐
46 tice and this notice are preserved.
47
49 The full documentation for libidn is maintained as a Texinfo manual.
50 If the info and libidn programs are properly installed at your site,
51 the command
52
53 info libidn
54
55 should give you access to the complete manual. As an alternative you
56 may obtain the manual from:
57
58 https://www.gnu.org/software/libidn/manual/
59
60libidn 1.41 stringprep_ucs4_to_utf8(3)