Font issue when importing a XML glossary.

Font issue when importing a XML glossary.

by Đinh Lư Giang -
Number of replies: 3
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.

Average of ratings: -
In reply to Đinh Lư Giang

Re: Font issue when importing a XML glossary.

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
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). wink

Feedback will be appreciated, ciao smile

PS: Don't forget to save your original file before replacing it with the one attached here. It will make things easier to undo.
Average of ratings: Useful (1)
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!smile
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