Tim,
I'm another user (rather new to Moodle but finding my way) but I just encountered the same problem mentioned above and I need to resolve it by the start of September.
Here's where I am. Hopefully you can help.
Hi guys,
I face a similar problem. I did an new installation of Moodle 1.6.1
When I write anythin in Greek and try to either same it, or create ana ssignment for students, or try to post to the forums, I only get ??????????? question marks.
I used the language import utility and imported the Greek langauge.
Any ideas?
Also, if go to check missing strings, while i have English as the selcted language, it says it is ok. If I change the langauge to Greek from the pull down menu, and i check for missing strings, it gives me a complete list of strings missing.... Is there something i need to do here?
thank you all for your help
pambos
Hello all,
I installed a new moodle of version 1.6+
Then, I installed the Chinese Language packs: zh_tw_utf8 and zh_tw.
The Chinese Traditional characters show in all menu and texts from all uploaded files into the language pack.
However, whenever I use the moodle editor to input any Chinese character, it only shows ?. When I enter text in English, it displays fine. The modules include editors in editing a topic in course, scheduler or appointment, quiz or test, assignment, forum, ...etc.
The operation settings were set to allow multilanguage as all the other users in the previous message.
Does the moodle 1.6 built-in editor actually NOT support UTF input? or does it NOT recognise the input as UTF?
I have installed two moodles 1.5.3 before on another two servers, and they worked fine with Chinese Traditional Characters input. Here below is some test, please see 試驗.... does this show in Chinese Character? It means "test".
Any ideas?
It's quite urgent!
Hi james,
I experience the same problem with Greek language. I am waiting to hear from a database expert. I was advised that it has to do something with the collations of MySQL database and they need to be set to support UTF8. Not sure ... waiting to resolve it. If I have any further news, will share
regards
pambos
Re: All languages don't display right except English
Hi, Koen,
Thanks for the reply. I read the information on both :
http://docs.moodle.org/en/Installing_Moodle
and
http://docs.moodle.org/en/Upgrading_to_Moodle_1.6
My moodle 1.6 was installed from Fantastico on a web hosting server. So I don't actually have the physical server in front of me and therefore, I don't have any administration authority to do any configuration of the server. Only one small partition is assigned to my web site.
But during the installations, I have double checked if the server support the installations by entering into Admininstration > Environment , the checkup of the environment is as follows:
Environment
|
Name | Information | Report | Status |
---|---|---|---|
database | mysql | version 4.1.16 is required and you are running 4.1.21 | OK |
php | version 4.3.0 is required and you are running 5.1.4 | OK | |
php_extension | iconv | is recommended to be installed/enabled | OK |
php_extension | mbstring | is recommended to be installed/enabled | OK |
Does the above tell me that the server should support the installation of moodle? or, does the above only means that I could run moodle 1.6 ok on the server, but it does not mean that the server is configured correctly to both edit and display Characters in UTF8?
Is there anything that I can do to "migrate the dbase" by making "default charset and the collation for the database set to utf8" ?
The new moodle now works on nearly everything except for the problems I am facing now. I have to use 80% Chinese and 20% English in all instructions of moodle. I am testing this new server to make sure I could later upgrade or transfer my existing two moodles to 1.6. which is more suitable for us in the next two years. What can we try now?
Could we make use of the phpMyadmin and run any SQL script? Sorry for nothing I know about server. Cheers
Thanks in advance.
James
Can you try to install Moodle yourself (creating a utf8 database with phpmyadmin, a folder, uploading, ...) ? The installation of Moodle is very easy. Experiencing it yourself might make upgrades later on easier.
Re: All languages don't display right except English--- fixed
Hi, here below is the solution:
Run phpMyadmin from cpanel. Check to see if the charset and collation are set to UTF-8. Even though it is, it doesn't mean that the text fields of the moodle tables are set correctly.
So, select dbase of moodle which is established already. Try to select one table at a time clicking the "edit button" (the one in the red circle) of one of the tables.
After the table is selected to edit, the collation is seen that the default is set to "latin1_swedish_ci" (as in the red circle). Select the two fields on the left of the table, and then click the "edit button" (as in the blue circle) at the bottom of the table.
At the edit panel, there are pull down menus and "utf8_unicode_ci" should be selected. Do the changes and press "save".
The files are then changed according to :
ALTER TABLE `mdl_attendance_log` CHANGE `status` `status` CHAR( 1 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
CHANGE `remarks` `remarks` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL
The steps should be repeated until all the table fields are altered.
However, if there are files consisting SQL queries / php code that would do all the alternation at one time for standard tables of a basic Moodle 1.6 downloaded from the Moodle official site, it would be more user-friendly.
I hope this note is self-explanatory and clear enough for those who need moodle to display languages other than English.
Cheers
James
James,
I want to thank you for the solution to the ??? problem and let you know that you're a hero. I fixed all the fields and presto--success!
Jake
Re: All languages don't display right except English--- fixed
Included in these lang folders is
lang/ja/moodle
which says
"<?PHP // $Id$
// moodle.php - created with Moodle 1.6 development (2005060201)"
(I seem to have 3 different versions of Moodle in here!)
and in the "charset" says
"$string['thischarset'] = 'EUC-JP';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Japanese';"
This seems to be interfering, as the Moodle only appears in proper Japanese characters if you select "Encode - EUC-JP" from the browser "View" menu EACH TIME YOU OPEN A NEW PAGE.
A veteran Moodle user I turned to for help suggests I trash all these old "lang" folders: I no longer need them as I have the new 1.6.1 version
but I can't figure out how to trash folders using cPanel.
My "uploaddata" folder:
It contains a "lang" folder which contains 3 folders:
"en"
"ja_utf8"
"ja_utf8_local"
The "ja_utf8" folder
"$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
(that last bit says "nihongo" in Japanese kanji, in case you have
trouble reading it)
It also says "<?PHP // $Id$
// moodle.php - created with Moodle 1.7 dev (2006092801)"
which seems to be the newest version, so I guess this is ok.
The "en" folder contains just one file, "moodle.php"
and this file is completely empty, just blank, nothing written in it whatsoever.
Should I trash the old "lang" folders, or go with James' solution? Or both?
Re: All languages don't display right except English--- fixed
Where and how do you run php/Myadmin from cpanel?
my host cpanel or fantastico doe not show php/Myadmin.
Version 1.5.4 works fine with all languages. You will not be able to imbed video files in this version but you can on 1.6.3
Another problem - when you choose files in the site files to put in a folder, there is no option for the folder. How does one organise sitefiles?
Dear Ali Rabi
Please find attached the diagram showing where the phpMyadmin is at my cpanel. It is located in the "control panel" section.
However, it depends on how your hosting service provider's settings. If you could not find the icon, ask them to activate this service for you. It is a normal function of cpanel, and most service providers would provide this function.
Cheers
James
Re: All languages don't display right except English--- fixed
Hi, Charalambos
Thanks for your reply. I wonder if your moodle is installed on an independent server or one from Fantastico. Mine is from the latter.
Anyway, I hope your dbase expert could solve the problem.
Good luck
James
Hi james,
just like you ... I am using c-panel, throguh which I used Fantastico to install Moodle. If I find out anything will let you know
please do the same : )
cheers
pambos
Re: All languages should display right in UTF8 even installed from Fantastico
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:
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
Re: All languages should display right in UTF8 even installed from Fantastico
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
Re: All languages should display right in UTF8 even installed from Fantastico
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, 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
Please help me
Amit
Re: All languages should display right in UTF8 even installed from Fantastico
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?
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.
Re: All languages should display right in UTF8 even installed from Fantastico
Any ideas?
Re: All languages should display right in UTF8 even installed from Fantastico
Re: All languages should display right in UTF8 even installed from Fantastico
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?
Hi,
unfortunately i got the same problem with moodle 1.8. whenever i enter japanese, korean, chinese or russian content, my database fields contain just question marks afterwards.
the proposed solution is not usable for me, as i run an mssql server 2005 and the sql scripts aren't available anymore. i have full access to the web server as well as the database server.
can anybody help me, please?
many thanks in advance!
Mario Reissmann
I installed Moodle with Fantastico and the version is 1.9
I have noticed that the default language collation is swedish.
I was unable to read James Chan's solution because his images were apparently removed by the time I found his post over a year later.
I'm surprised that Fantastico is still using a language other than UTF8 for default after all this time when doing Moodle installs for CPanel.
Now I have to continue searching for the solution because I can't see what James was talking about in the PHPMyAdmin. I can see the language for each table. Does he mean I have to go into all 169 tables one at a time?
He then gave a script link that was also dead by the time I found this which might provide a much needed short cut. If anyone knows the solution, I'm here really seriously in need of getting Greek and Hebrew fonts working on my site and not showing me ?????????
That way, you go through the installation and through the documentation as you go to prevent problems. A lot easier then fixing them.
The problem can also be caused by not having the right unicode fonts installed on your pc, but I assume you have them
જઃ Re: When I enter content I get only question marks
all my problems are solved now ,
I remove the moodle installed by fantastico and upload the moodle to my site and then just run the install.php, follow the instructions from installing moodle (http://docs.moodle.org/en/Installing_Moodle) [ frankly speaking, I did not understand any script but just read the Creating the data directory and Run the installer script to create config.php and run the page on my server ] and BINGO It was done perfectly. Now both moodle interface and my cource content is visible perfectly in Gujarati.
Your suggestion is great
Thanx
Amit
Re: જઃ Re: When I enter content I get only question marks
Quite easy way of handling this problem:
1. From Control panel login to PHPMyadmin
2. Choose your database and export it to sql file.
3. Now you need some text editor capable to convert file content to UTF-8. I'm recommending Notepad++ (free, open source text editor). Open database backup file with it and choose 'Format' -> 'Convert to Utf-8'
4. Do not close file, but choose 'Search' -> 'Replace', and than choose to replace all 'CHARSET=latin1' instances (or whatever encoding you have in tables)instances with 'CHARSET=utf8'. Close that window.
5. Copy content of the file (ctr+A -> ctrl+C)
6. Return to PHPMyAdmin and delete all tables in your database. Than go to 'SQl' tab, paste content of the db to 'Run SQL query/queries on database' field, click on GO, and - that's all
After some time ( depends on size of your DB, you should get answer that everything went fine, adn you tables are here again - now in utf-8 format.
This maybe looks complicated to novices , but you need not more then 5 minutes to complete all actions.
Remember: always make backup copy of the database before playing with it!
Re: જઃ Re: When I enter content I get only question marks
Your instructions were great and so easy. As a novice the only thing I found confusing from trying to look on a variety of posts was about deleting tables. So this is an explanation of the above step #6 (the first part) The easy answer was this:
1) Choose the data base on the left you want to delete tables from
2) Make sure the "Structure" Tab at the top is chosen.
3) Go to the bottom of the page and click "Check All"
4) Click on the pull down menu "With Selected"
5) Choose "Drop"