libclocale(3)

πŸ“¦ in opensuse-leap 16.0

πŸ’– 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 (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.h include 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 πŸ’–πŸŽ€πŸŒ·