I'm trying to import a XML format glossary. Everyhing is Ok except font. As my glossary include Vietnamese characters (in UTF-8 format), when the entries are imported, entries arenot correctly displayed. I attach here the XML that I exported from the same glossary and I have a question: what font should I set for the imported XML file?
Thanks for helps.
In reply to Đinh Lư Giang
Re: Font issue when importing a XML glossary.
Hi Dinh,
currently all the import routines inside Moodle (restore, glossary, scorm...) assume that you are reading UTF-8 data from the XML file (correct!) but converts it to ISO-8859-1 (wrong!).
That's one of the causes for the incoming "migration to utf-8" for everybody in the near future (I hope).
I've modified the "mod/glossary/import.php" file to avoid such UTF->ISO conversion so, the attached should leave data unmodified (UTF-8) and it should run well under your site (although I haven't been able to check it in my test server because I don't understand Vietnamese).
Feedback will be appreciated, ciao
PS: Don't forget to save your original file before replacing it with the one attached here. It will make things easier to undo.
currently all the import routines inside Moodle (restore, glossary, scorm...) assume that you are reading UTF-8 data from the XML file (correct!) but converts it to ISO-8859-1 (wrong!).
That's one of the causes for the incoming "migration to utf-8" for everybody in the near future (I hope).
I've modified the "mod/glossary/import.php" file to avoid such UTF->ISO conversion so, the attached should leave data unmodified (UTF-8) and it should run well under your site (although I haven't been able to check it in my test server because I don't understand Vietnamese).
Feedback will be appreciated, ciao
PS: Don't forget to save your original file before replacing it with the one attached here. It will make things easier to undo.
In reply to Eloy Lafuente (stronk7)
Re: Font issue when importing a XML glossary.
by Đinh Lư Giang -
No, I havenot any feedback, just one simple word: "EXCELLENT". Really good job!
In reply to Eloy Lafuente (stronk7)
Re: Font issue when importing a XML glossary.
by Martin Terbuc -
Thank You!
It work also in Slovene Language (Moodle 1.5.3+).
Martin
It work also in Slovene Language (Moodle 1.5.3+).
Martin