jcrodriguez-dis / moodle-mod_vpl

Virtual Programming Lab for Moodle (Module)
GNU General Public License v3.0
100 stars 87 forks source link

Emoji in text are malformed #139

Closed FeldrinH closed 1 year ago

FeldrinH commented 1 year ago

When entering emoji into a text file in the VPL editor the resulting file contains text that appears to be malformed (or at least not an encoding that my editor could detect).

For example, the emoji 😀, which in utf-8 is encoded as the bytes f0 9f 98 80 ends up as the bytes ed a0 bd ed b8 80.

jcrodriguez-dis commented 1 year ago

Dear @FeldrinH, thanks for your bug report. The problem isn't in the editor, you can edit, save and load UTF-8 non-Basic Multilingual Plane characters, the problem was in the JSON decoder used by the execution server that wasn't able to manage surrogate pair codes used coding non-Basic Multilingual Plane characters. The next release of the execution server software will include a patch for this issue #33f9913d790f109c365200fa868e3730bf8a3ada. Also, the next release of the VPL Moodle module will remove the coding of Unicode characters which will remove the problem on both sides.

Best regards, Juan Carlos.

jcrodriguez-dis commented 1 year ago

We're pleased to inform you that an issue regarding the transmission of UTF-8 non-Basic Multilingual Plane (BMP) characters via JSON has been successfully resolved. This was achieved in the recent VPL 4.1.0 release for the Moodle Plugin.

Please update to the latest version, VPL 4.1.0, to benefit from this improvement.