XSupportsLocale(3)
π XSupportsLocale(3) π
β¨ NAME β¨
okay so this page lives in the XLIB FUNCTIONS manual, and itβs serving two main-character functions: XSupportsLocale and XSetLocaleModifiers. Their whole job? determine locale support and configure locale modifiers. periodt. π
πΈ SYNTAX πΈ
Bool XSupportsLocale(void);
char *XSetLocaleModifiers(_Xconst char *modifier_list);
π ARGUMENTS π
modifier_listβ Specifies the modifiers. thatβs the string you hand over, bestie. π«Ά
π¦ DESCRIPTION π¦
XSupportsLocale is basically the vibe check: it returns True if Xlib functions are capable of operating under the current locale. If it returns False, then Xlib locale-dependent functions for which the XLocaleNotSupported return status is defined will return XLocaleNotSupported. The other Xlib locale-dependent routines? Theyβll operate in the "C" locale. no cap. π
XSetLocaleModifiers sets the X modifiers for the current locale setting. The modifier_list argument is a null-terminated string of the form {@category=value} β that means zero or more concatenated @category=value entries, where category is a category name and value is the (possibly empty) setting for that category. The values are encoded in the current locale. Category names are restricted to the POSIX Portable Filename Character Set. slay. β¨
okay so hereβs the local-host tea: the local host X locale modifiers announcer (on POSIX-compliant systems, the XMODIFIERS environment variable) is appended to the modifier_list to provide default values on the local host. If a given category appears more than once in the list, the first setting in the list is used. If a given category is not included in the full modifier list, the category is set to an implementation-dependent default for the current locale. An empty value for a category explicitly specifies the implementation-dependent default. iykyk. π
If the function is successful, it returns a pointer to a string. The contents of the string are such that a subsequent call with that string (in the same locale) will restore the modifiers to the same settings. If modifier_list is a NULL pointer, XSetLocaleModifiers also returns a pointer to such a string, and the current locale modifiers are not changed. cute. π
β οΈ If invalid values are given for one or more modifier categories supported by the locale, a NULL pointer is returned, and none of the current modifiers are changed. no messy half-updates, bestie. π
At program startup, the modifiers that are in effect are unspecified until the first successful call to set them. Whenever the locale is changed, the modifiers that are in effect become unspecified until the next successful call to set them. Clients should always call XSetLocaleModifiers with a non-NULL modifier_list after setting the locale before they call any locale-dependent Xlib routine. this is the rule, fr fr. π
The only standard modifier category currently defined is im, which identifies the desired input method. The values for input method are not standardized. A single locale may use multiple input methods, switching input method under user control. The modifier may specify the initial input method in effect or an ordered list of input methods. Multiple input methods may be specified in a single im value string in an implementation-dependent manner. very demure, very locale-coded. πΈ
π The returned modifiers string is owned by Xlib and should not be modified or freed by the client. It may be freed by Xlib after the current locale or modifiers are changed. Until freed, it will not be modified by Xlib. so donβt touch it, bestie β itβs Xlibβs property. π«Ά
π SEE ALSO π
Xlib - C Language X Interfaceβ the classic reference, bestie. go read it, itβs giving essential. πβ¨
this pageβs footer energy is X Version 11, libX11 1.8.14, and XSupportsLocale(3) β thatβs the sign-off, bestie. mwah. ππ
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms