From a983f05a3910110e74470b6a62fd7639faf4eef7 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 5 Jan 2006 16:35:13 +0000 Subject: [PATCH] Now the group by initial should work under multibyte strings. Merged from MOODLE_16_UTF8. Abandoning the branch. --- mod/glossary/view.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/glossary/view.php b/mod/glossary/view.php index d8ff828ea85..52bd2cbe176 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -48,6 +48,9 @@ require_login(); } +/// Loading the textlib singleton instance. We are going to need it. + $textlib = textlib_get_instance(); + /// redirecting if adding a new entry if ($tab == GLOSSARY_ADDENTRY_VIEW ) { redirect("edit.php?id=$cm->id&mode=$mode"); @@ -316,7 +319,7 @@ /// Setting the pivot for the current entry $pivot = $entry->pivot; if ( !$fullpivot ) { - $pivot = substr($pivot, 0, 1); + $pivot = $textlib->substr($pivot, 0, 1, current_charset()); } /// if there's a group break