Insert emoji character in code project

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
amiens80
User
Posts: 450

Insert emoji character in code project

Post by amiens80 »

hi,

i wish to display AND send emoji character in PHPMAKER project, can i insert it safely in PHPMAKER and save it safely ? all version (2020 2021 2022 2023...?)
As the code is save in a XML project, maybe the OS or XML encode charset is not safe ?

i tried to copy/paste this one 📅 into the php code (email_sending event). it display it, but once i delete it (using back-erase key), the edit display a "ascii" square character (like broken utf8 ascii thing...).
i did not try to save the project because i'm scare it would screw up the entire xml project file...
Moreoever, i search 'emoji' in the lastest phpmaker doc phpmaker.dev/docs/#/introduction.html and it did not return any result, so i ask it !

My phpmaker xml project encode header used is <?xml version="1.0" encoding="utf-8"?> , maybe in later releases of phpmaker you updated it to utf8mb14 or something else ?

Best regards


arbei
User
Posts: 9390

Post by arbei »

Note that "utf8mb4" is a MySQL 8 specific charset, it is not related to "utf-8" encoding for XML file or elsewhere. You can write any utf-8 characters in project file. If you worry above losing code, you should enable project history and save your project frequently.

If you use v2022 or newer, you should use the new Code Editor which supports your emoji characters well.

If you use MySQL which supports utf8mb4, make sure your advanced setting MySQL charset is empty (assume you use v2024) or you have set it explicitly as "utf8mb4" so you can save emoji character in database.


amiens80
User
Posts: 450

Post by amiens80 »

hi,

thank you for these details.
As the documentation is already well done for Awesome Fonts, maybe it could also complete it to tell people it is OK with emoji.

Best regards


arbei
User
Posts: 9390

Post by arbei »

Note that if you use utf-8 emoji, there is no difference between these emoji characters and other utf-8 characters at all.


Post Reply