Text strings with emoticons

Re: Text strings with emoticons

koen roggemans
Vastuste arv 2
Language pack maintainers pilt

It should work if you use UTF-8 emoticons and if the database is converted to support 4 byte unicode.

4 byte support  was part of an upgrade some time ago ... See https://docs.moodle.org/400/en/MySQL_full_unicode_support

Unicode emojis are (i think) these ones: https://www.w3schools.com/charsets/ref_emoji.asp

Vastuses koen roggemans

Re: Text strings with emoticons

Ralf Krause
Language pack maintainers pilt

Thank you, Koen.

We are translating the language packs for all Moodle platforms ... so we must see all platforms in the world. 

What happens with a text string if the text string comes with an emoticon and the Moodle database runs with utf8_general_ci and not with utf8mb4_general_ci? Will Moodle use the text string? Can Moodle provide the text string with the emoticon or will Moodle get problems with this text string?

Best regards, Ralf

Vastuses Ralf Krause

Re: Text strings with emoticons

koen roggemans
Language pack maintainers pilt
I don't know what the effect is of using a 4-byte language pack on a not migrated database. I think no problem as long as no 4 byte utf-8 characters are written to it. But that is hard to predict if and when that will happen. There are also loads of other easy ways users can enter 4 byte characters in the database, e.g. making a forum post from a mobile phone and adding an emoticon.

So, honestly, I don't think it is an issue. The feature of being able to use 4byte utf-8 characters went in on 13 March 2017. There are reminders on the upgrade page that converting the database is necessary. That is over 5 years now. No one should run a web app for 5 years without upgrading it or should ignore the upgrade recommendations. Newer installations should follow the installation guide and have 4-byte support.