Encoding problem in "news" (Chinese characters don't show)
Chinese seems to works pretty well with UTF-8 enabled but when adding news, all it shows is ???. Chinese to HTML code doesn't work either.
Any idea?
Chinese seems to works pretty well with UTF-8 enabled but when adding news, all it shows is ???. Chinese to HTML code doesn't work either.
Any idea?
Déjanos tu correo en la caja abajo y asegúrate de aprobar el correo de confirmación que recibirás
Comments
When I tried repeating
When I tried repeating creating three course pages within the Chamilo free campus - I find that the arrows allow to move between the pages created as shown by the list below the progression box but my created content does not appear. A friend of mine installed chamilo on a solaris both and it shows the same problems as my server - unable to use the course forward and back arrows to move through the different content pages in the course area but you can see at least one of the pages content although it apear as if you are stuck on that one page.
220-702
220-701
642-902
70-646
EX0-101
70-662
642-974
646-364
642-832
642-384
640-553
1Y0-A15
HP0-S27
CISA
642-374
thanks
thats really good, thanks for the info it helps me alot
Cheers
online writing job
sorry to dig up but issue is
sorry to dig up but issue is still there in 1.8.7.1!!!
No problem, you do the right
No problem, you do the right thing mentioning it. Ivan is the specialist for UTF-8 related stuff, so I suggest you wait for him to come around here again or you re-open the bug report that was closed just before 1.8.7.1 on support.chamilo.org.
This being said, I didn't see you copy-pasting part of the piece of news. I think it would make sense to have part of it for our tests.
Yannick
Ivan has looked into this
Ivan has looked into this and could'nt reproduce. i don't any other relevant information.
You can try to copy/paste any text in Chinese. this news will do just fine ;-)
中共中央政治局常委、国务院总理温家宝继续在甘肃舟曲县特大山洪泥石流灾区察看灾情,指导抗洪抢险救灾工作。 新华社记者 李学仁摄
to sum up the situation:
- editing links (tab) and frontpage works
- anything else fails (exercise, exercise description, private messaging, news, etc.) and results in ???
- editing the database directly with the Chinese text works
- trying to simply open in the interface a value/text (a news for instance) that was edited in the databse results in the text to revert to ???
nope. problem still there.
nope. problem still there. i'm so sorry. maybe i didn't describe the problem properly. i was talking about news, as in system annoucements (/main/admin/system_announcements.php).
editing the main page does actually work fine, not sure whether there was an issue there before (i think there wasn't) but i can confirm that editing main page from the page you modified does work now. so does adding links and text.
I did not see a problem in system_announcements.php
The file I changed will stay changed, there was a problem.
I tested system_announcements.php in Bulgarian, the messages were correct. Then I tried Chinese (which I don't speak or understand), the message seemed to be correct int the table and in the portal homepage. I have not seen a problem in this code so far.
I am proposing to you (using phpMyAdmin fo example) to check the table sys_announcement , which is in the main database. It should have utf8_general_ci collation, also the text fields title, content, lang should have the same collation utf8_general_ci.
checked the DB. title, lang
checked the DB. title, lang and content are all in right collation/encoding.
i really have no idea cos chinese works great on the rest of the platform...
I can't find a bug in the code, I checked once again
Maybe there is something unique in your system that I can not reproduce.
I really wish the problem to be located, so it to be solved in Chamilo 1.8.7.1, which is to come soon.
Please,
1.
Check the setting "Administration > Configuration settings > WYSIWYG Editor > Public pages compliance to WAI", let it be no. I don't expect this setting to be the cause, but let us see. Then:
2.
Page Administration > Portal news (a table table with the announcements) --> Are the titles in the table OK?
3.
Edition of an existing announcement --> Are title and content shown OK when the page loads?
4.
Create a new announcement and save it. With phpMyAdmin browse the table sys_announcement. See the record for the newly created announcement. Are the fields title and content shown OK in phpMyAdmin, i.e. are the title and content stored in the database correctly?
5. Are the newly created announcement shown on the portal homepage correctly?
6.
PHP version? On Windows or on Linux?
7.
Just in case, I am guessing blindly: See php.ini, are the extensions mbstring and/or iconv enabled?
8.
If you have some time, make a test on a different machine with a fresh installation of Chamilo 1.8.7.
1. checked. 2. no. 3. no. 4.
1. checked.
2. no.
3. no.
4. no, they are shown as ??? there too.
5. no, they are shown as ??? (one ? per character).
6. php version is 5.2.13. linux i suppose.
7. i dont have access to that.
8. tried locally with mamp. didnt configure anything and went straight to portal news. edited a news in chinese and it shows normally. i should tried on live server as well. will post eventually.
to conclude, there is probably no problem with the code but rather with my online installation or host (to be confirmed). i now notice that any chinese inputed in tests, courses or portal news are affected by this problem (tests and courses are usually edited in a language other than chinese). adding a link in chinese to the menu bar works fine though (!!!). could it be due to the fact that i updated from 1.8.6.2? something might have gone wrong.
follow-up to my previous
follow-up to my previous thread. i did a fresh 1.8.7 installation on my host. i verified that utf-8 was enabled, i didnt configure anything else at all and simply tried to edit and add a news from "portal news". the result was the same as on my main installation and resulted in ??? displaying instead of chinese.
Let us try a hard-coded
Let us try a hard-coded "dirty" way about the database connection encoding.
9.
See "Administration > Configuration settings > Character set" --> I forgot to mention, check whether this setting is UTF-8.
If UTF-8 value there does not solve the problem, then:
10.
Make a backup copy first an then open the file .../chamilo/main/inc/global.inc.php.
Go to the code fragment at lines 164-166:
if (empty($charset)) { $charset = 'UTF-8'; }Make it to be:
//if (empty($charset)) { // Commented, an encoding-related workaround $charset = 'UTF-8'; //} // Commented, an encoding-related workaroundIf the problem persists, then see the fragment at the lines 175-178:
Add after this fragment put the following statement:
Database::query("SET NAMES 'utf8';"); // An encoding-related workaroundIf this approach does not work, restore the file as it was.
-----------------------------------------------------------------------------
If the problem is still there, try to compare the configuration between the "good" and the "problematic" system.
If there is no configuration information available, at least you may browse the page "Administration > System status" for both of the systems.
no go
the above modification doesn't work.
i'm really confused because utf-8 is there. chineses displays normally system-wide. as i mentionned before, i can add links in chinese to menu bar.
i had a look at system status on local installation (mamp) and installation on my host. no difference besides the sql server version.
i would be curious to see others trying to add news in chinese on a production server...
It is a databse related problem, I think
If it is possible, use phpMyAdmin on your production host.
Open with phpMyAdmin the table sys_announcements and edit the record of the preliminary created announcement with Chamilo. Save the record.
See whether the edited record is shown correctly on phpMyAdmin. If not, you should contact you service provider.
See also how the edited with phpMyAdmin record is shown (as an announcement) on the correspondent pages of Chamilo. If the edited record on phpMyAdmin is shown correctly, but its correspondent announcement isn't shown correctly on the different pages, then there is maybe a problem in Chamilo's code.
I am out of other suggestions, I can't reproduce the problem here in my place.
i think we're getting
i think we're getting somewhere. i hadnt thought of editing directly in phpmyadmin...
i confirm that:
- editing an already existing annoucement directly in database works (=chinese is now shown correctly both in phpmyadmin and in chamilo)
- editing a new annoucement directly in database also works (correct chinese in db and chamilo)
- as soon as i try to edit or simply modify the annoucement values in chamilo (visibility, language it is shown to, etc.), it reverts to "???".
there is obviously a bug
there is obviously a bug here. I can't find the reason. I can replicate it on a newly installed (untouched) chamilo on my host.
could anyone try on a live system, please? thanks!
Yet another attempt
Probably the same bug has been reported again, see http://support.chamilo.org/issues/1802 (Task #1802).
The proposed there solution has been reported as successful by Oliver. It will be issued with Chamilo 1.8.8 alpha.
The most important change was http://code.google.com/p/chamilo/source/detail?r=c2fbf1a4967322e5c655ec7...
I don't know what else to propose.
hey, i'm Oliver
hey, i'm Oliver
It is a huge issue, but we
It is a huge issue, but we can solve it in short time. I will read more about it and I will be back with a review yacht charter dubrovnik
Working on a solution
Please, see the newly opened task http://support.chamilo.org/issues/1734
I think, the modified file .../chamilo/admin/configure_homepage.php will solve the problem.
http://code.google.com/p/chamilo/source/detail?r=196ae61e4706386777bf6d7...
forgot to mention, that's
forgot to mention, that's with 1.8.7