I currently run two moodle sites. I had thought they were both the same. Some early version of 1.8.
I upgraded one to 1.8.4 and it went smoothly.
I tried to upgrade the other one and it says "This version of moodle cannot upgrade your database to unicode" or something very similar. This puzzles me. I was sure that I did that conversion when I moved from 1.6 to 1.8.
At any rate I have a site running 1.8 (notification reports: Moodle 1.8 + (2007021503)) That will not upgrade to 1.8.4 due to a unicode error.
I desire to move to 1.9 but I am afraid I will have the same error.
Is there a way to simply upgrade my database to unicode, or repair it? Remember I am running 1.8, so I am not sure I could down grade to 1.6 and then back up. Or should I try that?
U odgovoru na Jonathan Konrad
Re: Upgrading from 1.8 but getting unicode error
napisao/la Jonathan Konrad -
Bump
I still have this error and I need to upgrade my site to 1.9. I am currently running 1.8 (notification reports: Moodle 1.8 + (2007021503)). If I try to upgrade to the latest 1.8.4 I get an error reporting that my database is not in utf8. However, if I download 1.7.4 it will not let me access the admin page because my databases were made with a newer version. Which makes sense since I'm already running 1.8!
I'm stuck. I cannot go down, I cannot go up. Please ... what can I check? what can I do?
Thanks
I still have this error and I need to upgrade my site to 1.9. I am currently running 1.8 (notification reports: Moodle 1.8 + (2007021503)). If I try to upgrade to the latest 1.8.4 I get an error reporting that my database is not in utf8. However, if I download 1.7.4 it will not let me access the admin page because my databases were made with a newer version. Which makes sense since I'm already running 1.8!
I'm stuck. I cannot go down, I cannot go up. Please ... what can I check? what can I do?
Thanks
U odgovoru na Jonathan Konrad
Re: Upgrading from 1.8 but getting unicode error
napisao/la Jonathan Konrad -
Here is a screen shot of my tables from phpMyAdmin. They look like they are in utf8. All the tables read as shown in this shot. What can I do to upgrade to 1.9?

Jon

Jon
U odgovoru na Jonathan Konrad
Re: Upgrading from 1.8 but getting unicode error
napisao/la Chris Surridge -
Hi fellows.
A similar thread over here tackled this issue, I think.
Let me paraphrase:
Login to your phpmyadmin, select the target database and run this query:
HOW VARIABLES LIKE 'character_set_database';
It will likely return something other than 'utf8' which is what it NEEDS to be.
If so, run this query:
ALTER DATABASE CHARACTER SET utf8;
That should do it.

A similar thread over here tackled this issue, I think.
Login to your phpmyadmin, select the target database and run this query:
HOW VARIABLES LIKE 'character_set_database';
It will likely return something other than 'utf8' which is what it NEEDS to be.
If so, run this query:
ALTER DATABASE CHARACTER SET utf8;
That should do it.
U odgovoru na Chris Surridge
Re: Upgrading from 1.8 but getting unicode error
napisao/la Jonathan Konrad -
Thank you for your response. I did run the query (your s was dropped so if anyone is following this it should be SHOW VARIABLES LIKE 'character_set_database';)
And it dis display utf8
I've attached a screen shot to help. I'm using MySQL 5.0.22, Apache Webserver 2.23, php 5.1.6 and moodle 1.8
I cannot update to the latest 1.8 nor move to 1.9. I am stopped with a unicode error.
And it dis display utf8
I've attached a screen shot to help. I'm using MySQL 5.0.22, Apache Webserver 2.23, php 5.1.6 and moodle 1.8
I cannot update to the latest 1.8 nor move to 1.9. I am stopped with a unicode error.

U odgovoru na Jonathan Konrad
Re: Upgrading from 1.8 but getting unicode error
napisao/la Richard Enison -
U odgovoru na Richard Enison
Re: Upgrading from 1.8 but getting unicode error
napisao/la Jonathan Konrad -
I get the same result as for the other inquiry. Here is a screen shot of the result


U odgovoru na Jonathan Konrad
Re: Upgrading from 1.8 but getting unicode error
napisao/la K.James Mathai -
I am also facing the same problem - unicode error while upgrading from 1.6 to 1.7, now I too can not have access to the admin block. can any one help
U odgovoru na K.James Mathai
Re: Upgrading from 1.8 but getting unicode error
napisao/la Richard Enison -
KJM,
- It is odd you would get a Unicode error upgrading to 1.7, because 1.7 does not require Unicode.
- It is highly recommended that you skip 1.7 and upgrade from 1.6 to 1.8.
- Before upgrading from 1.6, run the database migration feature in the Moodle Administration menu.
- Are you not able to access the admin block in 1.6 or 1.7? You may need to restore 1.6 from a backup.
U odgovoru na Richard Enison
Re: Upgrading from 1.8 but getting unicode error
napisao/la Jonathan Konrad -
I suppose I have not been clear enough. My Moodle is 1.8. It already is 1.8. However it is the first stable 1.8 and I wish to upgrade to the latest 1.8 then 1.9.
I should be able to. I'm already running 1.8. However when I attempt an upgrade I get a unicode error.
I believe my database is properly in unicode. All the inquires I've read about or told to do show it as utf8. So is there a flag or setting I can change manually so moodle will go to 1.8.4 or 1.9.
Thanks.
I should be able to. I'm already running 1.8. However when I attempt an upgrade I get a unicode error.
I believe my database is properly in unicode. All the inquires I've read about or told to do show it as utf8. So is there a flag or setting I can change manually so moodle will go to 1.8.4 or 1.9.
Thanks.
U odgovoru na Jonathan Konrad
Re: Upgrading from 1.8 but getting unicode error
napisao/la Richard Enison -
JK,
OK. You have run the query that Moodle used to use, and the one it currently uses (last time I checked) to determine compliance with Unicode, and got the right answer both times. Yet it says no. Very strange.
The answer to your question is yes. There is a flag you can use, and it may be the reason you are having this problem. Look in config.php for
$CFG->unicodedb
Does it set it = 0 (or false)? If so, change it to 1.
If you don't see it at all, add this to the file before the require_once line:
$CFG->unicodedb = 1;
I normally would not recommend doing this; i am only doing so in your case because you seem to have a genuinely Unicode-compliant database.
RLE
OK. You have run the query that Moodle used to use, and the one it currently uses (last time I checked) to determine compliance with Unicode, and got the right answer both times. Yet it says no. Very strange.
The answer to your question is yes. There is a flag you can use, and it may be the reason you are having this problem. Look in config.php for
$CFG->unicodedb
Does it set it = 0 (or false)? If so, change it to 1.
If you don't see it at all, add this to the file before the require_once line:
$CFG->unicodedb = 1;
I normally would not recommend doing this; i am only doing so in your case because you seem to have a genuinely Unicode-compliant database.
RLE