2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2017 Nexenta Systems, Inc.
20 .Nd convert a wide-character string to a multibyte character string
27 .Fa "char *restrict s"
28 .Fa "const wchar_t *restrict pwcs"
35 .Fa "char *restrict s"
36 .Fa "const wchar_t *restrict pwcs"
43 function converts a wide-character string
45 into a multibyte character string, beginning in the initial conversion state.
50 converted characters are stored into the array pointed to by
53 Conversion continues up to and including a terminating null wide-character,
54 which is also stored, or until
56 bytes have been stored into the array pointed to by
58 If the latter case results in partial multibyte character at the end of the
59 string, it is not stored.
63 function is affected by the
65 category of the current locale.
69 function behaves identically to
71 except instead of using the current locale, it uses the locale as specified by
78 functions return the number of bytes in the resulting character sequence, not
79 including the terminating null
83 if a code is reached that does not correspond to a valid character.
89 functions will fail if:
92 A wide-character code does not correspond to a valid character.
94 The conversion state is invalid.
96 .Sh INTERFACE STABILITY