COLLATE unicode_ci #4700
-
In SQLiteStudio works query "select * from table1 order by name COLLATE unicode_ci" . |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You need to register a default collation comparator to be used if SQLite does not have "unicode_ci" collation registered. This is done with call to A function pointer that you register with this function will be called by SQLite every time a collation is required to compare 2 values, but SQLite is unable to find suitable collation in its registry. In SQLiteStudio it's done in https://github.com/pawelsalawa/sqlitestudio/tree/master/SQLiteStudio3/coreSQLiteStudio/db)/abstractdb3.h Firstly, you can find:
This is done after the database was just open. The function pointer (3rd argument) to
Then we can see implementation of this default collation function:
It calls That's it. |
Beta Was this translation helpful? Give feedback.
You need to register a default collation comparator to be used if SQLite does not have "unicode_ci" collation registered. This is done with call to
sqlite3_collation_needed()
-> https://sqlite.org/c3ref/collation_needed.htmlA function pointer that you register with this function will be called by SQLite every time a collation is required to compare 2 values, but SQLite is unable to find suitable collation in its registry.
In SQLiteStudio it's done in https://github.com/pawelsalawa/sqlitestudio/tree/master/SQLiteStudio3/coreSQLiteStudio/db)/abstractdb3.h
Firstly, you can find: