Note: You are currently viewing documentation for Moodle 3.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Unicode.

Unicode

From MoodleDocs
(Redirected from admin/environment/unicode)

About unicode

Unicode is a character set that allows one to represent practically any language and many special characters used in science, math and technology. UTF-8 is a specific encoding of Unicode used by many applications. Moodle uses UTF-8 encoding to be able to support different languages. Support was added in 1.6 and was made mandatory from 1.8 onwards.

Prior to 1.6, Moodle did not support UTF-8 across all languages and the encoding in which the data was stored in the database depended upon the language used in a particular course.

Unicode collation

In MySQL, the database collation has to be set to unicode before the Moodle database is created. There are two different Unicode collations used: utf8_general_ci (default) and utf8_unicode_ci. The utf8_general_ci collation is slightly faster but less accurate than the utf8_unicode_ci collation in representing all the characters in languages. For this reason, Moodle tables are normally set-up using the utf8_unicode_ci collation. For a discussion of the difference between the collations see the MySQL documentation.

Free On-line Unicode Character Map gives you the possibility to see the different characters that are supported (or NOT!) in your browser and see which code is used if you need that. A nice feature with the characters is that you can easily enlarge the text in your browser to see them better. ([Ctrl]+[+] in Mozilla) If you are interested in Math symbols check list "22 Mathematical Operators". For Chemists looking for arrows, list "21" might be interesting.

Free offline java application, you must have java (ordinary, doesn't need the development environment) installed on your computer. Click on the JAR file. Chose Insert symbol, a popup with a list of categories comes, like "arrows" (but it doesn't have the group numbers).

Tex

Moodle has good support for mathematical expressions in its TeX filter, but using Unicode instead can sometimes be good. In some places (e.g. CLOZE questions) the \ characters for TeX can cause problems, whereas Unicode characters won't. A user can enlarge an expression with Unicode. Things that are displayed in a dropdown list won't display TeX but can contain Unicode math symbols.

Migrating to unicode

From Moodle 1.8 onwards, a database migration utility is no longer included. There is however a manual process to migrate your database.

From Moodle 1.6 onwards, all language packs are converted to UTF-8 and different languages may be used on the same page. Moodle 1.6 and 1.7 include a utility to migrate your database from any encoding to UTF-8.

Thus, if you wish to upgrade from 1.5 or an earlier version, you must first upgrade to 1.6, migrate your database to UTF-8, and then upgrade to 1.8. Similarly, if you are using Moodle 1.6 or 1.7 and have not yet migrated your database, you need to do so before upgrading to 1.8. Please refer to Upgrading to Moodle 1.6 for additional information.

See also