No support for custom sorting orders (collations)


Hi there,
it seems that this library does not support custom sorting orders or simply SQLite Custom Collations.

For the .Net framework these are defined here:

For example, in my Windows Phone 8 project I require support for zh-CN_stroke (PRC Chinese stroke count order) and zh-TW (Chinese radical/stroke order).

As the SQLite only supports BINARY, NOCASE and RTRIM collations out of the box, these are not sufficient to support Chinese or Japanese data properly. I haven't found any evidence that this is supported by the SQLitePCL library.

The custom sorting orders in the SQLite are added with registering a custom collation function using either "sqlite3_create_collation", "sqlite3_create_collation_v2", or "sqlite3_create_collation16" functions.

In case with Android, the platform wrapper implements "COLLATE LOCALIZED" which uses "sqlite3_create_collation" mechanism under the hood. Core Data on iOS also deals with this transparently for the consumer.

Do you have plans to implement the localized sorting under the hood, or at least to provide a way to register the custom collation functions? if YES, what is the estimated delivery date?

The lack of this feature is a significant barrier for implementation of globalized applications.
Thank you.
Closed Nov 25, 2014 at 1:57 PM by marianosz


leotilli wrote Aug 19, 2014 at 7:28 PM

Hi @kolesniks,
We'll be addressing this feature request with next release.

kolesniks wrote Aug 30, 2014 at 11:13 AM

Thank you very much for your response.
I am looking forward to see this feature in the next release.
Stan Kolesnik.

stuartb wrote Feb 6, 2015 at 10:44 AM

Hi there, I notice this feature is now closed. Can you expand on the implementation? Is there now support for 'COLLATE LOCALIZED'?

Thanks a lot