• Show log

    Commit

  • Hash : 135b3204
    Author : Pierre Le Marre
    Date : 2025-08-16T12:59:20

    compose: Add fallback for custom locales
    
    Before this commit, loading a Compose file based on the locale would fail
    if the locale is not in the X11 Compose locale registry. While there are
    workarounds (e.g. `~/.XCompose` file or `$XCOMPOSEFILE`), it does not
    work if the corresponding file has `include "%L"`.
    
    This commit adds the fallback `en_US.UTF-8` in case the locale is
    installed but not registered in the X11 Compose locale registry. The
    choice is motivated by the fact that most locales use `en_US.UTF-8`
    anyway.
    
    Ideally we should have a mechanism to extend the Compose locale registry
    at the *system* level. Mechanisms at the user level (e.g. custom Compose
    file, environment variable) are deemed sufficient.
    
    We could still improve it by first trying to fallback to the locale
    without the country bits, but there is no function to do such function
    in the stdlib and we do not want to mess with locales manually.
    
    Unfortunately is not possible to test it in our test suite. One can
    still check it works following these instructions:
    
    1. Create a custom locale, e.g. `en_XX.UTF-8`. `glibc-i18ndata` or
       similar package may be required to get the required files in
       `/usr/share/i18n/`.
    
       `sudo localedef -i en_US -f UTF-8 en_XX.UTF-8`
    2. `xkbcli compile-compose --verbose --locale en_XX.UTF-8`
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/libxkbcommon.git
    Git SSH git@git.kmx.io:kc3-lang/libxkbcommon.git
    Public access ? public
    Description

    keymap handling library for toolkits and window systems

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags