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