Emoji utf8mb4 not working

64 views
Skip to first unread message

John Blakely

unread,
Oct 13, 2022, 7:15:36 AM10/13/22
to Xataface
I have a database and tables setup in MariaDB to use utf8mb4 character set, and everything works as expected outside of Xataface. I am able to add and read records containing emojis both via database admin tool and with PHP code.

But Xataface does not display the emojis and shows question marks instead.
If I paste an emoji into a field via Xataface, the emoji is visible in the UI until I save, and it is then converted to question marks.

I have tried combinations of default_ie and default_oe, and it seems like the system default of "UTF-8" should work, but no luck.

Any suggestions?

In case it helps, I have attached an example of how the same record appears in the db tool and in Xataface.

Thanks
dbtool-emoji.PNG
xataface-emoji.PNG

John R Blakely

unread,
Oct 18, 2022, 1:17:05 PM10/18/22
to Xataface
Nudge. 
Can anyone suggest anything?
Thanks!

Mario Jakovina

unread,
Oct 20, 2022, 2:56:01 AM10/20/22
to Xataface
If you edit existing record, does emoji displays correctly in Edit form in Xataface?

Mario Jakovina

unread,
Oct 20, 2022, 3:07:30 AM10/20/22
to Xataface
John, can you send some emoji characters here so that I can try to paste them in my environment?

John R Blakely

unread,
Oct 20, 2022, 3:54:53 AM10/20/22
to xata...@googlegroups.com
Hi Mario,

Here are the characters (inside brackets []) from the attachment in my original email.

[This goes before
🏈 October Means 🏀 SPORTS Baby ⚾]

and

[🐻 🎌 🍔 🚀
This goes after]

Thanks so much for taking a look at this.

Regards,

John

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/d4604a82-13ad-44a5-bb06-e1b07576f2c8n%40googlegroups.com.

John R Blakely

unread,
Oct 25, 2022, 4:53:01 PM10/25/22
to Xataface
Hi Mario,

Did you get a chance to test this in your environment?

Anyone else have any suggestions?

Thanks!

Mario Jakovina

unread,
Oct 25, 2022, 5:25:51 PM10/25/22
to Xataface
Hi John,
Yes, I have the same problem in my environment.
Unfortunately, I don't know Xataface enough to inspect where the problems come from

Steve Hannah

unread,
Oct 26, 2022, 8:49:33 AM10/26/22
to xata...@googlegroups.com
I have just pushed a fix for this to master.
The problem was that Xataface was using utf8 for the MySQL encoding, which is an alias for utf8mb3, which doesn't support emojis.  I changed it to be mb4, which does.  



--
Steve Hannah
Web Lite Solutions Corp.

John Blakely

unread,
Oct 26, 2022, 12:51:53 PM10/26/22
to xata...@googlegroups.com
Hi Steve,

Thanks for making that update, but it does not seem to work for me.

I verified that the new Application.php file is in xataface/Dataface, but the behavior has not changed for me.
I also cleared the cache from the control panel just in case something was cached.

Could there be something else I am missing or need to update?

Thanks

You received this message because you are subscribed to a topic in the Google Groups "Xataface" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xataface/F3rbWYCGHDQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xataface+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/CABiRg%2BQK8K4mW0_1M6-KdLsDvdB4EcCCijww-cUWH8J8qRWwHA%40mail.gmail.com.

Steve Hannah

unread,
Oct 26, 2022, 12:55:12 PM10/26/22
to xata...@googlegroups.com
So your Application.php definitely has the utf8mb4 in the places shown in this commit https://github.com/shannah/xataface/commit/f17a222fd71b04e677cf5cd9b206a3ca31e91ba4
?

Triple check.  E.g. Throw some debugging code near those places (like echo statements) to be sure that it is running, and that it isn't running another install of Xataface you have somewhere.

Message has been deleted

John Blakely

unread,
Oct 26, 2022, 1:41:52 PM10/26/22
to xata...@googlegroups.com
Hi Steve,

My bad. Somehow my root index.php had an old path in the require_once for public-api.php.

Fixing the path to the correct/real xataface directory made everything work.

Thanks again for fixing this and patiently helping me find my error!

John

Steve Hannah

unread,
Oct 26, 2022, 1:45:03 PM10/26/22
to xata...@googlegroups.com
Glad to hear you got it working.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages