Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to apply utf8mb4 and only support utf8 in Home > User Admin > Manage Users > Edit User #1598

Closed
arthurtalkgoal opened this issue Jan 9, 2022 · 4 comments

Comments

@arthurtalkgoal
Copy link

arthurtalkgoal commented Jan 9, 2022

In Home > User Admin > Manage Users > Edit User , I tried the utf8mb4 char which failed to be stored:

𦾾 is utf8mb4 supported but not in utf8

I did tried the command in mysql query to test the result in gibbon:

update gibbonPerson set nameInCharacters="余東𦾾" where username = "myuser1" limit 1;

The database successful show the words in utf8mb4 but failed in gibbon, instead it becomes a "?"

And if I type the word 𦾾 in gibbon and save, the mysql col will store "????" instead.

My versions:
gibbon $version = '19.0.00';

mysql:
Server version: 5.7.36-0ubuntu0.18.04.1 (Ubuntu)

the gibbonPerson.nameInCharacters col setting:
| nameInCharacters           | varchar(120)                                          | utf8mb4_unicode_520_ci | NO   |     | NULL 

@arthurtalkgoal arthurtalkgoal changed the title Failed to apply utf8mb4 and only support utf8 Mysql Failed to apply utf8mb4 and only support utf8 Jan 9, 2022
@arthurtalkgoal arthurtalkgoal changed the title Mysql Failed to apply utf8mb4 and only support utf8 Failed to apply utf8mb4 and only support utf8 in Home > User Admin > Manage Users > Edit User Jan 9, 2022
@SKuipers
Copy link
Member

Hi @arthurtalkgoal thanks for your message. As you've seen, Gibbon doesn't support utf8mb4 by default, and while it is a development goal for us, we've identified a number of changes we'd need to make to work towards that in future versions.

As you're testing this change on your system, be sure to not only change the collation of the column itself, but also the database collation, which tends to be utf8_general_ci by default. There is also a Server Connection Collation setting in MySQL which will likely need to be changed in your local configuration: https://dev.mysql.com/doc/refman/8.0/en/charset-connection.html

@arthurtalkgoal
Copy link
Author

Thanks @SKuipers and the information. Can I ask that you mentioned Gibbon doesn't support utf8mb4 by default so that if I did the changes in mysql including the DB default charset and collation (which I did for the column only so far), then Gibbon should be able to allow the utf8mb4, is that correct? (or I need to change some PHP coding too, at least in the edit user page?)

Since it is a blocker to the school usage that around 5-10 students have the utf8mb4 chars in their name.

Thanks a lot.

@SKuipers
Copy link
Member

Hi Arthur, it just means we haven't had the capacity yet to investigate migrating the whole system over to using utf8mb4. Be sure to update your database and table charset, also check out the post here for changes to make to the MySqlConnector class: #1583. Hope this helps!

@SKuipers
Copy link
Member

I'm closing this PR for now, utf8mb4 support has been added to the v24 roadmap. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants