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

Please grant the next Q2A version the ability to allow emojis #854

Closed
teddydoors opened this issue Oct 10, 2020 · 4 comments
Closed

Please grant the next Q2A version the ability to allow emojis #854

teddydoors opened this issue Oct 10, 2020 · 4 comments

Comments

@teddydoors
Copy link

teddydoors commented Oct 10, 2020

Please grant the next Q2A version the ability to allow emojis, or in another words 4-byte unicode characters. Currently, there is a big nuisance to achieve it. You can do it by changing the databases settings with uft8mb4 char-set (along with uft8mb4 connection etc...), or doing some tricks to convert emojis into their ALT codes. In either case, you still have to stop Q2A system from removing emojis.

qa_get_post_content function removes emojis from posts.
qa_get_tags_field_value function removes emojis from tags
qa_handle_email_filter removes emojis from handle (ie username)
qa_get_post_title removes emojis from question titles

All 4 functions are done by another function named qa_remove_utf8mb4 in qa-include/util/string.php

Of course, we still want to remove emoji from titles, tags, and usernames. But to stop removing emojis from posts, we need to override qa_get_post_content function. Unfortunately, this function is not overridable. (qa_remove_utf8mb4 in qa-include/util/string.php is not either). We have no choice but to edit the core file.

Back in 2013, there might be some faint reasons that MySQL needs to be at least 5.5. But now, it's 2020, and MySQL version is usually 2 times bigger.

@phy25
Copy link
Contributor

phy25 commented Oct 10, 2020

We have no choice but to edit the core file.

I guess then a pull request would be appreciated here.

@arjunsuresh
Copy link

There's already a pull request.
#798

@q2apro
Copy link

q2apro commented Oct 18, 2020

Does it have performance issues? I. e. will q2a be slower with this charset?

If yes, then it should be optional.

@arjunsuresh
Copy link

I don't think so. Switching overt to it didn't cause any noticeable issue on our sites.

@svivian svivian closed this as completed Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants