.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) Bruno Haible .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH wcsrtombs 3 "17 novembre 2024" "Pages du manuel de Linux 6.12" .SH NOM wcsrtombs \- Convertir une chaîne de caractères larges en séquence multioctet .SH BIBLIOTHÈQUE Bibliothèque C standard (\fIlibc\fP,\ \fI\-lc\fP) .SH SYNOPSIS .nf \fB#include \fP .P \fBsize_t wcsrtombs(char \fP\fIdest\fP\fB[restrict .\fP\fIsize\fP\fB], const wchar_t **restrict \fP\fIsrc\fP\fB,\fP \fB size_t \fP\fIsize\fP\fB, mbstate_t *restrict \fP\fIps\fP\fB);\fP .fi .SH DESCRIPTION If \fIdest\fP is not NULL, the \fBwcsrtombs\fP() function converts the wide\-character string \fI*src\fP to a multibyte string starting at \fIdest\fP. At most \fIsize\fP bytes are written to \fIdest\fP. The shift state \fI*ps\fP is updated. The conversion is effectively performed by repeatedly calling \fIwcrtomb(dest, *src, ps)\fP, as long as this call succeeds, and then incrementing \fIdest\fP by the number of bytes written and \fI*src\fP by one. The conversion can stop for three reasons: .IP \- 3 Un caractère large que l'on ne peut pas représenter par une séquence multioctet (dans la locale utilisée) a été rencontré. Dans ce cas \fI*src\fP pointera sur le caractère non valable et la fonction renverra \fI(size_t)\ \-1\fP et place \fBEILSEQ\fP dans \fIerrno\fP. .IP \- The size limit forces a stop. In this case, \fI*src\fP is left pointing to the next wide character to be converted, and the number of bytes written to \fIdest\fP is returned. .IP \- La chaîne de caractères larges a été complètement convertie, y compris le caractère large nul final (L\[aq]\[rs]0\[aq]), ramenant \fI*ps\fP à l'état initial. Dans ce cas, \fI*src\fP devient NULL et la fonction renvoie le nombre d'octets écrits dans \fIdest\fP, sans compter l'octet nul final (\[aq]\[rs]0\[aq]). .P If \fIdest\fP is NULL, \fIsize\fP is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and that no size limit exists. .P Dans tous les cas, si \fIps\fP est NULL, un état anonyme statique, réservé à la fonction \fBwcsrtombs\fP(), est utilisé à sa place. .P The programmer must ensure that there is room for at least \fIsize\fP bytes at \fIdest\fP. .SH "VALEUR RENVOYÉE" La fonction \fBwcsrtombs\fP() renvoie le nombre d'octets constituant la partie convertie de la séquence multioctet, sans compter l'octet nul final. Si elle rencontre un caractère large qu'elle ne peut convertir, elle renvoie \fI(size_t)\ \-1\fP et place \fBEILSEQ\fP dans \fIerrno\fP. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lbx l l l. Interface Attribut Valeur T{ .na .nh \fBwcsrtombs\fP() T} Sécurité des threads T{ .na .nh MT\-Unsafe race:wcsrtombs/!ps T} .TE .SH STANDARDS C11, POSIX.1\-2008. .SH HISTORIQUE POSIX.1\-2001, C99. .SH NOTES Le comportement de \fBwcsrtombs\fP() dépend de la catégorie \fBLC_CTYPE\fP de la locale utilisée. .P Passer NULL dans \fBps\fP n'est pas sûr dans un contexte multithread. .SH "VOIR AUSSI" \fBiconv\fP(3), \fBmbsinit\fP(3), \fBwcrtomb\fP(3), \fBwcsnrtombs\fP(3), \fBwcstombs\fP(3) .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot , Jean-Baptiste Holcroft et Grégoire Scano . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .