Created attachment 568082 [details, diff] Patch to icu-63.1-r1.ebuild My system uses locale ISO-8859-15. I noticed that qmmp (the music player), with the "Simple User Interface" which is in QT, stopped showing certain directories with latin characters. Digging around I found a similar complaint in SUSE which traced it down to a recent change in icu 61.1: https://bugzilla.suse.com/show_bug.cgi?id=1095425 The problem is that icu started to assume that all linux distros should have "define U_CHARSET_IS_UTF8 1" by default, which ignores the user locale! It is claimed this is done for efficiency but, in Gentoo, we lose nothing if there's a compile-time choice. So, attached is a trivial patch to the icu ebuild so that it recognizes the unicode use flag. If it is active, do nothing, since icu already makes sure UTF8 is forced by default. If it is disabled, then force U_CHARSET_IS_UTF8 to 0, and this way icu respects the user locale again. After recompiling icu, and restarting qmmp, the problem was solved (no other recompilations needed). I believe nothing is lost with this method and "legacy" users are respected. Thanks!
Wouldn't you want to fix qmmp instead?
(In reply to Jeroen Roovers from comment #1) > Wouldn't you want to fix qmmp instead? I didn't consider that option because I figured this is something "sistemic" and there may be lots of other programs with this preconception. I don't use many QT apps so I have no idea how widespread it might be. In my view, it was icu who changed the default, and in Gentoo it's trivial to make that default configurable. Seems the easiest way to me. In SuSE they even reverted icu's assumption, as per their bug (notice it links to https://build.opensuse.org/request/show/613919 -- Add icu-susevers.diff and disable UTF-8 assumption).
Created attachment 603270 [details, diff] Disable UTF-8 hardcoding, which enables locale detection again It seems everyone uses UTF-8, as it remains UNCONFIRMED, yet the issue persists. At this point, if anyone's affected by this, just copy icu-disable-utf8.patch to /etc/portage/patches/dev-libs/icu/ and be done with it. Patch ripped from SuSE which shipped patched packages last december, check out the previous link.
Created attachment 617620 [details, diff] Disable UTF-8 hardcoding for 65.1 Quick update for icu-65.1-r1.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9442d61a4c4d8483f53868776586446aba7a7d78 commit 9442d61a4c4d8483f53868776586446aba7a7d78 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2020-11-28 18:51:05 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2020-11-28 18:53:56 +0000 dev-libs/icu: Allow non-utf8 locales again Bug: https://bugs.gentoo.org/679674 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> dev-libs/icu/files/icu-68.1-nonunicode.patch | 12 ++++++++++++ dev-libs/icu/icu-68.1.ebuild | 1 + 2 files changed, 13 insertions(+)
I just tested stock dev-libs/icu-68.2 and the ebuild correctly patches icu. More hardcoded than my proposal, but works for me. Thank you.