Hey everyone!
I’m a new user of OSMC on my Raspberry Pi3, and I encountered the following problem:
When I arrange my movies to displayed by title in the video library, titles starting with accentuated letters are displayed at the bottom of the list instead of their normal place in the alphabetic order.
I’m hungarian and we have lots of extra letters like á, é, ö, ő, etc., but I have set the region, codetable and theme to hungarian, so it should use the correct order.
Is there a place where I can set the order of letters in the alphabet, or I have to live with the mismatched titles?
Thanks in advance for any help!
It might be a Kodi faiing, but let’s see if the operating system is sorting correctly on your machine.
I set my Pi to hu_HU.UTF-8 by running sudo dpkg-reconfigure locales
and then rebooted.
My locale is now showing:
LANG=hu_HU.UTF-8
LANGUAGE=
LC_CTYPE="hu_HU.UTF-8"
LC_NUMERIC="hu_HU.UTF-8"
LC_TIME="hu_HU.UTF-8"
LC_COLLATE="hu_HU.UTF-8"
LC_MONETARY="hu_HU.UTF-8"
LC_MESSAGES="hu_HU.UTF-8"
LC_PAPER="hu_HU.UTF-8"
LC_NAME="hu_HU.UTF-8"
LC_ADDRESS="hu_HU.UTF-8"
LC_TELEPHONE="hu_HU.UTF-8"
LC_MEASUREMENT="hu_HU.UTF-8"
LC_IDENTIFICATION="hu_HU.UTF-8"
LC_ALL=
I have a sort testing file:
báb
baz
baa
bez
béc
böd
boe
that now sorts as follows:
baa
báb
baz
béc
bez
boe
böd
Not being Hungarian, I can’t say if this sort order is correct (eg béc before bez) but at least the diacritic letters are not being sorted to the bottom of the list. In fact, it looks like the accents are sometimes being ignored.
Can you SSH to the box and see what your locale
is showing?
Edit: Here’s the same file sorted with the en_US.UTF-8 locale:
baa
báb
baz
béc
bez
böd
boe
The last two words are reversed but diacritics still aren’t sorting to the end, so it could be a Kodi issue.
@dillthedog: Thanks a lot, this was the issue! My locale was set to “C”, but I’ve reconfigured it to “hu_HU.UTF-8”, and the titles are now in the correct order.
Is there an easy way without slowing down the system to reconfigure my keyboard in the console to hungarian, or should I live with the english layout? I’m not using the console that much.
That’s interesting - and good news.
Keyboards are @grahamh’s thing. Perhaps he can advise you.
BTW, I just tried hu_HU.ISO-8859-2 and the sort order is different again!
Depends what you call ‘easy’! For a start, if you are talking about the console when you ssh in, that is governed by the client machine, not the Pi. On the Pi, you can go:
sudo apt-get update
sudo apt-get install console-data
sudo loadkeys hu
Then if you also have a Hungarian locale, you should see the right characters. At the moment, this setting will not affect what you see in Kodi when you type in the keyboard dialogue. There’s a patch for that which I hope Sam will put in this month’s update.
Now I understand why they say OSMC has an awesome community. Thanks for the help guys!
@dillthedog: Actually there are different versions of the same accentuated letters, like á and à or é and è. Maybe you’re not using the correct letters in your list? We’re always using accentuated letters where the accent points to the right like á and é.
But all’s well in the end, since my order is correct now.
@grahamh: Thanks, I’ll do this when I get home from work! Will this method slow down bootup and change the splash screen like other methods I’ve read on the forum?
I’ve not noticed any issues with the splash screen and haven’t tested boot times with/without with nothing else getting in the way. Let us know if either of these are a concern.
If you are referring to this: [BUG REPORT] Danish Hardware Keyboard layout not working - #3 by DBMandrake, we don’t need keyboard-configuration, just console-data and the kbd package (for loadkeys) which is in the default OSMC image.
Unfortunately, my Hungarian language expertise doesn’t go far beyond igen and nem, so I tried to find a file of Hungarian words but it was getting late, so I just copied the diacritic letters from your post.
True story. I heard a Hungarian friend say “nem tudom” so I asked him what it means. He said he didn’t know.