Sitelet https://web.archive.org/web/20211228085245/https://github.com/xbmc/xbmc/issues/15125
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sorting locale-aware on Android #15125

Open
yol opened this issue Dec 24, 2018 · 6 comments
Open

Make sorting locale-aware on Android #15125

yol opened this issue Dec 24, 2018 · 6 comments

Comments

@yol
Copy link
Member

@yol yol commented Dec 24, 2018 •

Roadmap or todo suggestion

Detailed Description

Android libc does not support locales, which we need for locale-aware sorting (e.g. sorting "Ä" after "A" and not at the end of the list in German). So we need another, proper solution. Options would be to use the JNI to call the locale-aware Java functions or use libICU, which has locale-aware comparison abilities. The latter option seems most promising. There is a wrapper library available unofficially (android/ndk#548) that allows to use the C API of the system-bundled libICU, so we would not even have to build and ship it (data files are quite large). We would have to integrate the wrapper and headers though.

Context

Required to get list sorting on Android on-par with all other platforms

Possible Implementation

See #12268 (comment) - that should basically be all

Additional context, screenshots or links

Here are some relevant links or screenshots

Prior attempt in v18: #12268

Issues that appeared: #14952, #15026

Note: Team Kodi will consider this item however we will not make any promises if it will be included.

@GiannisProkopiou
Copy link

@GiannisProkopiou GiannisProkopiou commented Mar 14, 2020 •

Greetings,i would like to know if this is still open.
If it is open let me know if there is anything other that what i see that i need to know!
Thanks in advance!

@gusandrianos
Copy link
Contributor

@gusandrianos gusandrianos commented Mar 15, 2020

I don't think I ever opened a PR for this issue 🤔

@GiannisProkopiou
Copy link

@GiannisProkopiou GiannisProkopiou commented Mar 15, 2020

I am sorry,it was a mistake.I edited it :/

@DaveTBlake
Copy link
Member

@DaveTBlake DaveTBlake commented Mar 26, 2020

The addition of ascii folding collation by #17562 certainly improves the situation for Android users - "Ä" gets treated as "A" etc. However it does not offer full language specific collation, perhaps there is reason to leave this issue open.

If someone is interested in internationalisation then Kodi core and database implementations SQLite and MySQL/MariaDB could also be extended to be ICU enabled (thus collate and query correctly based on UFT8)

@taoyouh
Copy link
Contributor

@taoyouh taoyouh commented May 10, 2020

I tried the libicundk at https://gitlab.com/koying/libicundk/-/tree/master and it seemed to work (see draft PR #17833 ). However, I still have problem integrating that library into the repo.

I have two options to integrate the library:

  1. Copy the codes into the library.
    Question: how to deal with the includes? The ICU headers need to have the "libicundk/include" folder in the include path. I'm not familiar with Kodi's build system and don't know how yet.
  2. Integrate it with the depends build system.
    We need a more formal place to host the libicundk library, and then we can add it into the depends build system.

@fuzzard
Copy link
Contributor

@fuzzard fuzzard commented May 10, 2020

2 is your only option. Tarball can be created of a release, or specific commit for hosting on mirrors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants