charset not being set on enrol students/teachers pages

charset not being set on enrol students/teachers pages

by Gavin McCullagh -
Number of replies: 1
Hi,

I'm using English but with the UTF-8 charset.  I did this by creating an extra language pack with just "thischarset" in it as follows.

----------------------------------------------------
gavinmc@moodle:/usr/share/moodle$ ls lang/en_utf8/
moodle.php  README
gavinmc@moodle:/usr/share/moodle$ cat lang/en_utf8/moodle.php
<?PHP // $Id$
      // moodle.php - created by Gavin to use UTF-8 with English.

$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'English';

?>
----------------------------------------------------

Generally this works.  However, there seems to be a problem within the courses area. When I go to enrol students or teachers on a course, those pages are still set to iso-8859-1 both in the headers and in the meta tags.  If a user with a UTF-8 name (eg Setanta Ó Hailpín) logs in and goes to course pages, the page is set as iso-8859-1 and their name gets munged.

If this is some problem of my set up please let me know but I wouldn't have thought so.

Gavin

Average of ratings: -
In reply to Gavin McCullagh

Re: charset not being set on enrol students/teachers pages

by James Phillips -
I did something similar to this and found that I encountered fewer problems if I left the language pack as it was (i.e. I did not change the en language pack to unicode) but changed the config.php to force unicode:

// This setting will put Moodle in Unicode mode. It's very new and
// most likely doesn't work yet. THIS IS FOR DEVELOPERS ONLY, IT IS
// NOT RECOMMENDED FOR PRODUCTION SITES
// $CFG->unicode = true;

As you can see from the above comments, it is probably best to try this out quite extensively on a site that is not live before going live with it. You can see the results on my site at http://www.horsefrog.com