Patch for grouping with utf8 concept

Patch for grouping with utf8 concept

av Lasha Altunashvili -
Antall svar: 2

Hello All,

I and my friends are in the process of creating the Georgian (ka_utf8) language pack for Moodle. One of the problems we had was the grouping for concepts, defined in utf8. I made some changes in view.php of Glossary module which should not affect users who do not use utf8. Attached are problem screenshots and diff file for view.php. It might be useful for other people who use UTF8 in glossaries.

Some questions; is there any changes planned to make this module friendlier for Unicode and particularly for utf8? Any experience using mbsring functions in moodle? Should we use function overriding in php.ini? Thanks in advance.


Regards
Lasha

Gjennomsnittlig vurdering: -
Som svar til Lasha Altunashvili

Re: Patch for grouping with utf8 concept

av Timothy Takemoto -
Thank you very much Lash, This may be of help over on the Japanese moodle forum, where we have been having problems with the glossary and UTF8. Over there however, Mits proposes using a different solution: mbstring. Please see this bug. 
http://moodle.org/bugs/bug.php?op=show&bugid=2936&pos=1
Timothy
Som svar til Timothy Takemoto

Re: Patch for grouping with utf8 concept

av Lasha Altunashvili -

Thanks Timothy,

We have exactly the same problem with import/export to XML in Glossary module. I recompiled my php with mbstring enabled and set up str* function overriding feature in php.ini (mbstring.func_overload=2). Unfortunately it did not work so far.

 

The problem with grouping was not connected to mbstring features directly, as you can see from the code, it is a hard coded one byte grouping. Another problem was to change the comparison code, which uses strtoupper(). As I mentioned, mb_* version of the function did not helped. Thats why I removed strtoupper() functions for non ASCII characters in my patch and it works fine (at least for Georgian language). BTW the version I am using is 1.4.4 (2004083140)

I will definitely post solution if Ill have.


Lasha