localeconv(3)
๐ localeconv(3) ๐
okay bestie, welcome to the localeconv page โ that's localeconv from the Library Functions Manual, and she's here to spill the tea on how your program formats numbers and money. โจ
๐ธ NAME ๐ธ
localeconv โ get numeric formatting information
๐ซถ LIBRARY ๐ซถ
Standard C library (libc, -lc)
โจ SYNOPSIS โจ
#include <locale.h>
struct lconv *localeconv(void);
๐ DESCRIPTION ๐
so like. localeconv() hands you back a pointer to a struct lconv for whatever locale you're currently rocking. that structure is shown in locale(7), and it's holding all the values tied to the locale categories LC_NUMERIC and LC_MONETARY. no cap. ๐
programs can also use printf(3) and strfmon(3), which do their thing according to the actual locale in use. iykyk.
๐ฅ RETURN VALUE ๐ฅ
localeconv() returns a pointer to a filled-in struct lconv. this structure may be โ and in glibc, is โ statically allocated, and it may be overwritten by subsequent calls. ๐
according to POSIX, the caller should not modify the contents of this structure. hands off, bestie.
the good news? localeconv() always succeeds. she never misses. ๐ฏ
๐ฆ ATTRIBUTES ๐ฆ
for an explanation of the terms used in this section, see attributes(7).
- Interface:
localeconv() - Attribute: Thread safety
- Value:
MT-Unsafe race:localeconv locale
โ ๏ธ yeah so that's a race condition situation, she's not thread-safe, be careful out there ๐ซถ
โญ STANDARDS โญ
C11.
๐ HISTORY ๐
C89. she's been iconic since forever.
๐ BUGS ๐
the printf(3) family of functions may or may not honor the current locale. not me finding out it's a coin flip ๐ญ
๐ SEE ALSO ๐
locale(1), localedef(1), isalpha(3), nl_langinfo(3), setlocale(3), strcoll(3), strftime(3), locale(7)
okay that's the whole page, periodt. ๐ this little gem comes from Linux man-pages 6.20, dated 2026-02-08 โ go forth and format your numbers correctly, bestie, you got this ๐งโจ
๐ฆ 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
- Copyright 1993, Thomas Koenig <ig25@rz.uni-karlsruhe.de>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms