libclocale(3)
π libclocale(3) β the glow-up edition π
okay so this is a page from the Library Functions Manual (yeah that's the fancy manual name, we're being official today β¨) and it's all about libclocale.h β literally the library that has your back for cross-platform C locale functions. cross-platform!! no cap, she works everywhere π¦
πΈ NAME πΈ
libclocale.h β bestie, it's a library to support cross-platform C locale functions. that's the whole vibe. iconic behavior only π
β¨ SYNOPSIS β¨
#include <libclocale.h>
π«Ά Support functions
const char *
libclocale_get_version(void);
int
libclocale_initialize(const char *domain_name,
libclocale_error_t **error);
π Codepage functions
int
libclocale_codepage_get(int *codepage, libclocale_error_t **error);
int
libclocale_codepage_set(int codepage, libclocale_error_t **error);
int
libclocale_codepage_copy_from_string(int *codepage, const char *string,
size_t string_length, uint32_t feature_flags,
libclocale_error_t **error);
available when compiled with wide character string support (she has a whole extra mode, obsessed):
int
libclocale_codepage_copy_from_string_wide(int *codepage,
const wchar_t *string, size_t string_length, uint32_t feature_flags,
libclocale_error_t **error);
π§ Locale functions
int
libclocale_locale_get_codepage(int *codepage,
libclocale_error_t **error);
int
libclocale_locale_get_decimal_point(int *decimal_point,
libclocale_error_t **error);
π DESCRIPTION π
so the main character of this paragraph is libclocale_get_version() β she's the one whose whole job is to retrieve the library version. that's it. that's her arc. and honestly? she ate π₯
π RETURN VALUES π
okay listen, most of these functions return NULL or -1 on error β which one depends on the return type, so don't come for me. for the actual return values you gotta go look at "libclocale.h" itself. iykyk π
π ENVIRONMENT π
None
like literally nothing. no env vars. empty. a clean slate. we love a low-maintenance queen π
π FILES π
None
same energy. nothing to see here bestie.
β NOTES β
okay this part is important so pay attention π
libclocale can be compiled with wide character support (wchar_t). fancy.
to compile libclocale with wide character support use:
./configure --enable-wide-character-type=yes
or define:
_UNICODE
or:
UNICODE
during compilation.
and LIBCLOCALE_WIDE_CHARACTER_TYPE β which lives in libclocale/features.h β is your girl for figuring out whether libclocale was compiled with wide character support in the first place. vibe check β
π BUGS π
found a bug of any kind? please report it on the project issue tracker, she wants to know:
https://github.com/libyal/libclocale/issues
π AUTHOR π
these man pages are generated from "libclocale.h". that's the source of truth, periodt π
π₯ COPYRIGHT π₯
Copyright (C) 2010-2024, Joachim Metz <joachim.metz@gmail.com>.
this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (translation: she's free, she's generous, but she is NOT promising she'll work, and you can't sue her about it π)
π¦ SEE ALSO π¦
- the
libclocale.hinclude file
and that's the whole page!! β¨ this one's from libclocale, dated March 1, 2019, living her best life as libclocale(3) β go forth and locale responsibly bestie πππ·
π¦ where this page comes from
- opensuse-leap 16.0: libclocale-devel 20240414-bp160.1.11 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libclocale-devel 20240414-bp160.1.11 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libclocale-devel 20240414-bp160.1.11 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libclocale-devel 20240414-bp160.1.11 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms