Moodle 3.8 to 3.10 update, lost Windows 10 emojis

Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Stepan Prokazov -
Number of replies: 6

Hi everyone! 
I updated Moodle 3.8 to 3.10 and after update all Windows emojis looks like some symbols, like '?' or combinations of symbols '?‍♂️' . Updating from 3.8 to 3.9 gives the same effect. In 3.8 version everything is OK. I understand that emojis is not important thing for online education, but it's very important for our content makers. 

Using latest versions of browsers Chrome and Firefox. Windows 10 have all updates. DB collation is equal in all versions.

May be somebody know how to resolve this issue?

Thank you and Happy New Year! smile 

Average of ratings: -
In reply to Stepan Prokazov

Re: Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

What database type – MySQL, MariaDB, PostgreSQL or SQL Sever –  is in use, and which version of this?

Is the Moodle 3.10 site on the same server as the 3.8 site?

Are there any warnings in the Environment report?

In reply to Leon Stringer

Re: Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Stepan Prokazov -
database mysql (5.7.21-20-log)
I test upgrade on stage server. Another instance of 3.8 (prod. version) on separate server. On stage server 3.8 before upgrade looks fine, but after it begins this problem.

No warnings in Environment 
In reply to Stepan Prokazov

Re: Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Can you share some screenshots of this, of the 3.8 site where it displays as expected, and of the 3.10 site where it displays incorrectly. Hide any information you don't want to share on the Internet.

What is the PHP version? What's the web server (e.g. Apache, Nginx, IIS) and version of this?

What theme does the site use?

In reply to Leon Stringer

Re: Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Stepan Prokazov -
CentOS 7
php version  7.2.5

Nginx 1.12.2

Theme Space, but in BOOST is the same

Attachment prod1.jpg
Attachment stage1.jpg
In reply to Stepan Prokazov

Re: Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I think that somehow the character encoding is being lost in the database.

If I use a Moodle 3.8 site with the database set to the recommended utf8mb4 character encoding necessary for emojis, this works as expected:

Screenshot of a page activity with five emojis correctly displayed

If I back up this database without specifying the character encoding and then restore this database I get (still Moodle 3.8):

Screenshot showing page activity but emojis are not displayed correctly, '?' is shown instead

because mysqldump will use utf8 (not utf8mb4) by default.

What might be happening to you: when you copy the site to staging it seems to work because the cache is copied in Moodledata but actually the copied database has already lost the emoji characters due to the above. After the the upgrade the Moodledata cache is purged and you see the problem.

If this is the case ensure the database is backed up with the correct character encoding, e.g. run mysqldump with --default-character-set=utf8mb4.


Average of ratings: Useful (1)
In reply to Stepan Prokazov

Re: Moodle 3.8 to 3.10 update, lost Windows 10 emojis

by Ken Task -
Picture of Particularly helpful Moodlers

To add an alt to Leon's mysqldump command ...

in admin/cli of existing site, there are mysql_ php scripts that will fix issues with DB ... mysql_collation.php, mysql_compressed_rows.php, and mysql_engine.php.   All have help screens if called without options.  Help screens explain options.   Those scripts must be run from command line so knowing or finding php-cli is necessary.

'SoS', Ken