Bug 20269

Summary: Allow selecting default collate rule
Product: Koha Reporter: paxed <pasi.kallinen>
Component: DatabaseAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: josef.moravec, magnus, mengu
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21923
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description paxed 2018-02-22 13:09:54 UTC
For some languages, the default collate rule set in kohastructure.sql, utf8_unicode_ci, doesn't work correctly.

For example, Finnish alphabet expects the alphabet to sort abc...xyzåäö, but the unicode_ci rule doesn't handle the åäö right. Instead, we need to use the swedish_ci rule.

It would be nice to be able to define the default collate rule during install.

Problem can be seen for example when you go catalogue a new record and have frameworks starting with 'ä' or 'ö', those will sort incorrectly.

On the database, you can test this with:

insert into biblio_framework (frameworkcode, frameworktext) values ('TEST', 'Äänikirja');

-- Note where the 'Äänikirja' is located
select * from biblio_framework order by frameworktext collate utf8_unicode_ci;

-- And then the correct order, with 'Äänikirja' last:
select * from biblio_framework order by frameworktext collate utf8_swedish_ci;
Comment 1 Katrin Fischer 2023-10-07 23:36:28 UTC
*** Bug 21923 has been marked as a duplicate of this bug. ***