Charset encoding and mysql

Ok not realy a wappler question… trying to get emojies to show from mysql . When displayed in wappler i see ???

If i change Field type to BLOB in mysql they display fine but the field won’t be searchable(as far as i know) I’m using utf8mb4_bin

any tips?
I managed to get some to work by resetting the db/table collate/charset but not all emojies come through or get stored. (unless i put directly into table)

collate is set to utf8mb4_unicode_ci and charset utf8mb4
I even edited the db connect file.

cant figure it out!

2
Capture

1 Like

Fixed! :slight_smile: Had to make a change in connection.php

First convert mysql tables&db to utf8mb4 / utf8_unicode_ci

Then if you still cannot insert or view Emojies in wappler change this line:

5 Likes

This is a great fix…but also get’s erased by a Wappler upgrade… @George any thoughts on a permanent solution?

I tried this on the server, but the setting by Wappler seems to take precedence.

[mysqld]
init_connect = "SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci"

I wasn’t aware that we need this fix. Thanks for the heads up Ken!

@patrick should check it and include it

Hi George,
I’ve just had to manually change this as @Kattouf suggested above. I guess it might have slipped off the list. Can I give it a bump to be included in an upcoming update?

1 Like

@patrick can we include this fix?

1 Like

The fix only works for users who have there database set to utf8mb4 which is not the default for most mysql/maria databases. We could perhaps add the charset as an option on the UI for mysql.

I also have this problem, I need to use Hebrew characters on one of the tables and I just can’t. There is no place on Wappler where I can set the collation…

I’m using Docker/Mariadb

The charset options has already been added to the UI, so the original bug report was solved and I will close this topic.

When you say you can’t set the collation from within Wappler you probably mean when creating a table with the database manager, since it is already possible to set the charset in the database connection. Please create a new bug report with your specific problem.