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

Emoji's in Comments #2477

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Emoji's in Comments #2477

wants to merge 3 commits into from

Conversation

JoeCohen
Copy link
Member

@JoeCohen JoeCohen commented Oct 8, 2024

  • Prevents error from being thrown when someone uses an emoji in a Comment
  • Changes Comments table charset and collation
  • Delivers Emojis in Comments #2077

Manual Test

Create a comment with some emoji's.
Expected result: Comment is saved without throwing an error.

- Prevents error from being thrown when someone uses an emoji in a Comment
- Changes Comments table charset and collation
- Delivers #2077
@JoeCohen JoeCohen linked an issue Oct 8, 2024 that may be closed by this pull request
@JoeCohen

This comment was marked as resolved.

@coveralls
Copy link
Collaborator

coveralls commented Oct 8, 2024

Coverage Status

coverage: 93.472%. remained the same
when pulling 8a0851a on 2077-emojis-in-comments
into 09d1cbd on main.

@JoeCohen
Copy link
Member Author

JoeCohen commented Oct 8, 2024

Oh. Trilogy is complaining about notes.
Those are the the rss_log notes, where it's trying to put at least the comment summary:

  RssLog Update (1.3ms)  UPDATE `rss_logs` SET `rss_logs`.`notes` = '20241008224229 log_comment_added summary 🥵 user Joe%20Cohen\n20241008224054 ...

So I need to also migrate the rss_logs table.

- Fixes Trilogy Error in manual test on prior commit.
(The rss_log.notes column must be able to include all chars used in comments.)
@JoeCohen
Copy link
Member Author

JoeCohen commented Oct 9, 2024

I'm having second thoughts about this PR (and about @mo-nathan's suggestion of "migrating the entire database to use utf8mb4 and also standardize the collation on utf8mb4_0900_ai_ci, which are the current Rails standards."
Does utf8mb4 would affect exports, including those to MyCoPortal and GBIF? Do they accept non UTF-8 characters?
Not so much a problem with Comments, but it might be with Names, Observations, and Locations.
Maybe we should revert to UTF-8, rescue any error, and display a warning.

@JoeCohen JoeCohen requested review from nimmolo and mo-nathan October 19, 2024 00:49
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

Successfully merging this pull request may close these issues.

Emojis in Comments
2 participants