Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108082

Regression: Qt doesn't use libc method to get locale for libxkbcommon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.7, 6.2.6, 6.4.0
    • None
    • Linux/Wayland, Linux/X11

    Description

      The offending commit is: https://github.com/qt/qtbase/commit/73ea9f032864566cc019d286b2f210b78cd70a3d

      It falsely thinks that applications have to call setlocale for this to work, but they don't need in fact as Qt does that for them, here: https://github.com/qt/qtbase/blob/365904085e27b49d402e389d5c454781eca4f3f5/src/corelib/kernel/qcoreapplication.cpp#L563

      Looking at the issue it was intended to fix (QTBUG-85529) the cause is most likely user misconfiguration; the user likely forgot to generate the locale, that could be discovered with:

      locale -a

      Now, given that Qt doesn't use libc's method, it also doesn't convert the aliases and entering accents fails as soon as the user has set

      LANG=en_US.UTF8

      rather than

      LANG=en_US.UTF-8

      (setlocale would return normalized en_US.UTF-8 that works with xkbcommon).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            ilya-fedin Ilya Fedin
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes