In fact terminal applications don’t display characters correctly, for example dnf:
$ sudo dnf install gcc
Ultima verifica della scadenza dei metadati: 0:53:56 fa il dom 19 feb 2023, 15:10:02.
Il pacchetto gcc-12.2.1-4.fc37.x86_64 ďż˝ giďż˝ installato.
Dipendenze risolte.
Nessuna operazione da compiere.
Fatto!
The Fedora Workstation uses /var/lib/AccountsService/users/${USER} to store user session locale to and busctl can utilize the D-Bus API to edit that session config.
Here’s the output, I use GDM and KDE Plasma Wayland:
$ loginctl session-status
1 - <username> (1001)
Since: Sun 2023-02-19 17:23:11 CET; 52min ago
Leader: 1325 (gdm-session-wor)
Seat: seat0; vc2
TTY: tty2
Service: gdm-autologin; type wayland; class user
State: active
Unit: session-1.scope
|-1325 "gdm-session-worker [pam/gdm-autologin]"
|-1347 /usr/bin/gnome-keyring-daemon --daemonize --login
|-1351 /usr/libexec/gdm-wayland-session --register-session "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
`-1356 /usr/bin/startplasma-wayland
feb 19 17:23:11 fedora systemd[1]: Started session-1.scope - Session 1 of User <username>.
feb 19 17:23:11 fedora gdm-autologin][1325]: pam_unix(gdm-autologin:session): session opened for user <username>(uid=1001) by (uid=0)
feb 19 17:23:11 fedora gdm-autologin][1325]: gkr-pam: gnome-keyring-daemon started properly
The keyboard code is not the same as the language code. Tne language code for United Kingdom is “en_GB.utf-8”. The keyboard layout code is independent from the choice of language code.
I feel like a fool, because I could have just tabbed to get the right text, but the thing that I don’t understand is why it didn’t seem to work at first.
I reran that with sudo, I deleted the .config/plasma-localercfile and logged out, when I logged back in locale still showed the same thing as before, then I figured I’d try changing to a completely different language to see what would happen, I put en_GB.UTF-8 (with sudo), removed that plasma config file and rebooted, now the it_IT-UTF-8 was finally applied properly!
But that’s not what I expected to happen, theoretically I should have got English instead, I don’t know what I’m doing wrong/misunderstanding
I must correct myself here, I just changed the language to British English in the Plasma settings and logged out, now everything is working as expected:
Lastly, checking back through my command history I found out that the equal solution given by @vgaetera should have been effective of course, it’s just that I’d never deleted the .config/plasma-localerc after doing the change until I tried again after my mistake was pointed out by @ilikelinux and it occurred to me that was a required step when working in Plasma.