Debian Codegraph @

upstream/debian-unstable/man3/MB_LEN_MAX.3

raw
1 .\" Copyright, Bruno Haible <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .TH MB_LEN_MAX 3 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 MB_LEN_MAX \- maximum multibyte length of a character across all locales
9 .SH LIBRARY
10 Standard C library
11 .RI ( libc )
12 .SH SYNOPSIS
13 .nf
14 .B #include <limits.h>
15 .fi
16 .SH DESCRIPTION
17 The
18 .B MB_LEN_MAX
19 macro is the maximum number of bytes needed to represent a single
20 wide character, in any of the supported locales.
21 .SH RETURN VALUE
22 A constant integer greater than zero.
23 .SH STANDARDS
24 C11, POSIX.1-2008.
25 .SH HISTORY
26 C99, POSIX.1-2001.
27 .SH NOTES
28 The entities
29 .B MB_LEN_MAX
30 and
31 .I sizeof(wchar_t)
32 are totally unrelated.
33 In glibc,
34 .B MB_LEN_MAX
35 is typically 16
36 .\" For an explanation of why the limit was raised to 16, see
37 .\" http://lists.gnu.org/archive/html/bug-gnulib/2015-05/msg00001.html
38 .\" From: Bruno Haible
39 .\" Subject: Re: why is MB_LEN_MAX so large (16) on glibc
40 .\" Date: Thu, 14 May 2015 02:30:14 +0200
41 (6 in glibc versions earlier than 2.2), while
42 .I sizeof(wchar_t)
43 is 4.
44 .SH SEE ALSO
45 .BR MB_CUR_MAX (3)