When I enter content I get only question marks

Re: All languages should display right in UTF8 even installed from Fantastico

by J. Chan -
Number of replies: 6

Dear Charalambos Vrasidas

Please refer to my previous message for step by step setting of phpMyAdmin.

However, for a faster way, you may run the attached script in phpMyAdmin > select Database > Run SQL queries:

scripts.sql

The script is for the purpose of migration of dbase to "set the the default charset and the collation for the database to utf8". It could be used for most other languages, i.e. to make moodle display what you input --- all in "utf8_unicode_ci".

Please make a note that in the script, you could remove any table that your SQL doesn't have, or you may manually add in more for more tables.

The script has not been tested. I just copy and paste them from what I did as described in my previous message.

I hope the script could facilitate the process. Hope it is also useful for upgrade purpose.

Cheers

James

 

In reply to J. Chan

Re: All languages should display right in UTF8 even installed from Fantastico

by J. Chan -

Replying to myself,

Sorry that I forgot to put in ";" at the end of each paragraph for the scripts as described in my previous message at http://moodle.org/mod/forum/discuss.php?d=51827&parent=243937

The scripts has been modified and updated now. Perhaps I should rename it as migrationUTF8.sql

The script is for the purpose of migration of dbase to "set the default charset and the collation for the database to utf8". It could be used for most other languages, i.e. to make moodle display what you input --- all in "utf8_unicode_ci".

The script has, again, not been tested. I just copy and paste them.

However, for every new installations or upgrades of new modules or blocks, you have to enter phpMYAdmin, each time, to set the default charset and the collation for the database to utf8, as according to my previous message hereunder:

http://moodle.org/mod/forum/discuss.php?d=51827&parent=243870 

The above method is mainly for those who installed Moodle 1.6 or 1.6+ on a web host through the use of Fantastico in the C-panel.

Cheers

James

In reply to J. Chan

Re: All languages should display right in UTF8 even installed from Fantastico

by Dr. Amitkumar Mali -
Dear James
I seen lot of people got their language solution from u in the language forum that create a hope for me.

I have installed moodle on my site http://moodle.dietbvn.org hosted by siteground.com. by using Fantastico. the version is 1.9

I have also installed the gujarati language pack.
I have created this language pack by using "Baraha" a Free Indian Language Software (http://www.baraha.com/).

I have no idea what PHP and MySql is,sad i am a teacher who wants to use moodle for my instrucations.

now, when i visit mysite, and change my language preference to Gujarati, the moodle appear perfectly in gujarati but when i creat a cource or write anything in gujarati(using the same software baraha which was used for creating gujarati language pack) it appears as only ??????.

When I read the help topics provided by siteground.com, I found it like ::

How to change the collation for all tables in a mysql database (to utf8)?


Changing the collation for all tables in a mysql database can be time consuming depending on how many tables you have.

That's why we recommend using the following PHP script for changing the collation for all tables at a time:

<?php
$db = mysql_connect('localhost','myuser_mydbuser','mypassword');
if(!$db) echo "Cannot connect to the database - incorrect details";
mysql_select_db('myuser_mydbname'); $result=mysql_query('show tables');
while($tables = mysql_fetch_array($result)) {
foreach ($tables as $key => $value) {
mysql_query("ALTER TABLE $value COLLATE utf8-general_ci");
}}
echo "The collation of your database has been successfully changed!";
?>

Make sure to substitute in the above script:

- myuser_mydbname with your database name;

- myuser_mydbuser with your mysql username;

- mypassword with your password for the mysql user;

- utf8-general_ci with your new collation if different;


can u help me to modify the script and how to run it.

following is the "envirronment" report
moodle%20error.jpg


Please help me
Amit
In reply to Dr. Amitkumar Mali

Re: All languages should display right in UTF8 even installed from Fantastico

by James Carvin -

I have gone to the streetsmartingit.blogspot.com web site you referred to and copied and tried your code. I notice that in addition to their instructions that since the server is going to be on their site, not your own computer, that you need to also replace "localhost' with the IP of your server. This can be found by logging into your CPanel and finding your PHPMyAdmin. When you log in you will see the IP in your address bar. (Took me several hours to figure that out).

However, it still doesn't work, on my web host anyway, My Web Host is HostICan and I was unable to get this. When I finally seem to access the site with the php script I get the following warning … So we are back to resetting collation in each of the 198 tables, an idea I still haven't figured out how to accomplish. For all the time it's taken to do this automatically, I could have done it by now if only I knew the how to change even one table's charset and collation. I've gone to the trouble of backing it up. It's time to just do this one table at a time. Anyone know how?

alarm_red.gif

Oppss... It seems you have made some changes, which have caused a few problems. Please view below...

    • Incorrect file and/or folder permissions (greater than 755)
    • .htaccess issue (php_flag, php_value statements,etc.)
    • Other possible reasons

If you are the website administrator, please review Internal Server Error 500. This will provide you with insight into how to resolve this issue.

 
In reply to James Carvin

Re: All languages should display right in UTF8 even installed from Fantastico

by Peter Poznyakov -
I have the same problem: ???? instead of Russian letters in my both Moodles, hosted by SiteGround. Version 1.9 updated 20080522. Everything was OK when I started a new Russian Moodle a few days ago, but yesterday something happens when I tried to edit Front page of my second Moodle, and now I have ??? where should be Russian letters in both. Russian letters are shown normally as it should be in Moodle Translation, but do not work at all when I try to type myself.
Any ideas?
In reply to Peter Poznyakov

Re: All languages should display right in UTF8 even installed from Fantastico

by Peter Poznyakov -
I have created one more Moodle with Fantastico De Luxe (SiteGround Host). Everything OK. Russian letters shown properly. But how long for? One day you can loose everything...
In reply to Peter Poznyakov

Re: All languages should display right in UTF8 even installed from Fantastico

by Peter Poznyakov -
As soon as you are trying to type non-English text (let say, in front page) after saving it converted to ???? (question marks) in SiteGround Moodle (v.1.9). I did 5 instances of Moodle with the same result does not matter if this is their (SiteGround's) Moodle, installed with Fantastico De Luxe, or updated version, installed manually.
It's interesting, that on another hosting (freehostia, v.1.8) it never happen.
Unfortunately, I can't check it either Moodle version or Host fault, as I can't install v.1.9 on Freehostia, and failed to install v.1.8 on SiteGround.
Any opinions, please?