wchar_t(3type)

✨ wchar_t β€” the wide-character type, bestie ✨

okay so real talk, wchar_t is living its main character life in the <pink>Standard C library</pink> (<lavender>libc</lavender>), and we're about to get into it. no cap. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

like, here's the whole entrance, verbatim, don't touch it:

#include <stddef.h>

typedef /* ... */  wchar_t;

#include <stdint.h>

#define WCHAR_WIDTH  /* ... */
#define WCHAR_MAX    /* ... */
#define WCHAR_MIN    /* ... */

πŸ¦‹ DESCRIPTION πŸ¦‹

so wchar_t is the type you use when you wanna store a wide character. that's it, that's the job. and ngl, it's an integer type β€” she's a whole number underneath, she just has a fancy wide character reputation. periodt. πŸ’–


🌸 STANDARDS 🌸

  • C11
  • POSIX.1-2024

πŸ’œ HISTORY πŸ’œ β€” the lore, the origin story

  • wchar_t β€” she came in with SUSv1, C99, and POSIX.1-2001. iconic from day one. ✨
  • WCHAR_MAX
  • WCHAR_MIN β€” these two arrived together in SUSv2, C99, POSIX.1-2001. matching besties fr fr. 🫢
  • the WCHAR_WIDTH macro is newer btw, she got added in C23 β€” late to the party but she ate. πŸ”₯

⭐ NOTES ⭐

listen, this type is everywhere, she does not gatekeep. these headers also provide this type:

  • <inttypes.h>
  • <stdlib.h>
  • <wchar.h>
  • <wctype.h>

and this header also provides these macros:

  • <wchar.h>

🫢 SEE ALSO 🫢

go say hi to the neighbors:


vibe check passed πŸ’― now you know your wide characters and your width macros, bestie. go forth and be unicode-correct, i'm obsessed with you πŸ§šβ€β™€οΈ

kisses, this page came to you from Linux man-pages 6.20 πŸ’œ dated 2026-01-09 πŸ’œ it's the wchar_t(3type) era and we're all just living in it πŸ’…πŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms