Help please Environment unicode is required to be installed/enabled.

Help please Environment unicode is required to be installed/enabled.

by R Mc -
Number of replies: 3
First let me say I have looked at the converting to UTF8 and actually used iconv to conver the characterset of the files.

It is my understanding that ICONV can only be used to convert files so I would assume it is used for converting flat files and does not apply to the Database itself.

The following is the installation I have along with what I have done to configure the site.

  1. Windows 2003 Server Fresh install with SP2 and .NETframework 2.
  2. IIS 6.0 install - tested and worked
  3. Moodle directory installed and configured in the wwwroot as a Website. Tested web page here and it worked.
  4. PHP Install. Had to reconfigure the ISAPI path so it did not have the '~' signs and tested the php install with a phpinfo() function in the moodle directory that worked.
  5. MySQL 5.0.45 Server install Command Line only. Default Coallation and Characterset was latin1 I have changed the characterset to utf8 in the my.ini file of the MySQL install. I also restarted the DB at this point.
  6. I made sure the config.php file for Moodle has the proper settings for the configuration. I even included $CFG->loginhttps= false; since I am not running with SSL.
  7. Ok so the site works and I can even log into the Moodle site. When I go to Server->Environment I get the following :

error1.jpg

The Database I am using was a sqlbackup made for testing. I imported it at the command line and as far as I know from looking at the dump it shows to create all tables in UTF8.

So my question is what am I missing?

Any help in this matter is greatly appreciated thanks smile
Average of ratings: -
In reply to R Mc

Re: Help please Environment unicode is required to be installed/enabled.

by R Mc -
I used the following command in mysql and it fixed the error
ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

I am going to replicate the whole install again and use the sql command above to see if that is the only problem from the get go.

Hope this helps anyone who is encountering the same problem.


In reply to R Mc

Re: Help please Environment unicode is required to be installed/enabled.

by Richard Enison -

RMc,

I would only add to KW's post a couple of points:

  1. Normally you shouldn't need to use ALTER DATABASE commands. When you upgrade to 1.6 or 1.7, there is a link at the top of the admin page that handles the database migration to Unicode automatically, unless you have some problematic third-party modules or other add-ons. See http://docs.moodle.org/en/Upgrading_to_Moodle_1.6#Database_migration and http://docs.moodle.org/en/Database_migration.
  2. Since you apparently have already done this, you should know that there is more to making a database fully Unicode than that ALTER DATABASE command. I believe that that just changes the default character set and collation sequence of the database itself. It is also necessary for each table to have UTF8 character set and collation. Finally, the data in the records of each table have to be translated to the new character set. That's why the migration process can only be done once; otherwise, characters that are already Unicode are assumed to be Latin or whatever they were before and are translated to Unicode, resulting in a whole bunch of gibberish. surprise See http://moodle.org/mod/forum/discuss.php?d=69967#p313782
  3. So whatever you do, before you do it, BACKUP THE DATABASE!!! If you accidentally mess it up, you can always go back and try again.

RLE