Glossary mode=letter should not attempt uppercaseing the hook in Georgian unicode

Glossary mode=letter should not attempt uppercaseing the hook in Georgian unicode

by Petre Chitashvili -
Number of replies: 1
There is no such thing as uppercase characters in the Georgian language.
For some reason, though, Unicode supports uppercase Georgian characters, which only ever creates problems.

The problem is that selecting a character in the glossary (with the querystring being https://{moodle_site_url}/mod/glossary/view.php?id=419&mode=letter&hook=ა) doesn't filter corresponding glossary items.

I set the following in moodle_data/mod/glossary/view.php
$DB->set_debug(true);

The queries that I am getting are as follows:

SELECT COUNT('x') FROM mdl_glossary_entries ge LEFT JOIN mdl_user u ON u.id = ge.userid WHERE ((ge.glossaryid = ? OR ge.sourceglossaryid = ?)) AND (SUBSTR(upper(ge.concept), 1, 1) = ?) AND (ge.approved != 0 OR ge.userid = ?) [array ( 0 => '15', 1 => '15', 2 => 'Ა', 3 => '2', )]

and

SELECT ge.*, u.id AS userdataid, u.picture AS userdatapicture, u.firstname AS userdatafirstname, u.lastname AS userdatalastname, u.firstnamephonetic AS userdatafirstnamephonetic, u.lastnamephonetic AS userdatalastnamephonetic, u.middlename AS userdatamiddlename, u.alternatename AS userdataalternatename, u.imagealt AS userdataimagealt, u.email AS userdataemail FROM mdl_glossary_entries ge LEFT JOIN mdl_user u ON u.id = ge.userid WHERE ((ge.glossaryid = ? OR ge.sourceglossaryid = ?)) AND (SUBSTR(upper(ge.concept), 1, 1) = ?) AND (ge.approved != 0 OR ge.userid = ?) ORDER BY ge.concept ASC, ge.id ASC LIMIT 0, 10 [array ( 0 => '15', 1 => '15', 2 => 'Ა', 3 => '2', )]

The symbols that get passed to the SUBSTR(upper(ge.concept), 1, 1) = ? are uppercased unicode symbols (so instead of which is incorrect as entries themselves don't use uppercase unicode Georgian symbols).

I tried searching for where these queries are generated but failed.. :-|

Question: Where can I change the above queries to NOT attempt uppercaseing the hook symbol (ა to ) and to NOT search in the upper(ge.concept)?

Thanks!
- Petre
Average of ratings: -