You are not logged in.
Pages: 1
Hi,
the task is to create a none case sensitive custom collation for Hungarian. I thought it would be best to create a modified version of an existing function like UTF8ILComp, but looking at the implementation it is not obvious at which points the extra code can be added. If this approach is good, it would probably be useful to document it in the source code.
There are two types of problems to solve:
1.Some accented characters like "ú" needs to be ordered after "u" but before "x" .
2. There are a few letters composed of two or three characters eg "cs" which needs to be ordered after "cz" and before "d". This requires access to the next two characters before making a decision.
Last edited by Leslie7 (2017-10-11 11:33:58)
Offline
I guess you expect the collation to be only at Sqlite3 level, right?
Then you can use TSQLRecordProperties.SetCustomCollation() with the expected collation function.
Offline
That's the plan. But I need to create the collation function for the native language to do that. I hoped that the easiest and most optimized way would be to start with the current implementation of UTF8ILComp and customize it. But it is not obvious how to do it. I assumed that this an issue with other locales as well, that is why I have asked for some general advice about tweaking the code.
Offline
See how SynSQLite3.pas implements its custom collations, and do the same.
Also check https://sqlite.org/c3ref/create_collation.html
Offline
Pages: 1