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

LEAF-4581 - extended character sets #2612

Merged

Conversation

shaneodd
Copy link
Contributor

@shaneodd shaneodd commented Dec 2, 2024

This change is mainly for emojis and any data that is falling in the 4 byte space. We were notified of this when a form grid had issues when trying to save the smiley character. There is database changes as well as small code change.

Set Names

The SET NAMES command is used to tell the client (your PHP script) what character encoding should be used when sending queries to the server. This setting also influences how data will be retrieved from the server.
https://dev.mysql.com/doc/refman/8.4/en/set-names.html

With mb3 and latin1 columns and this setting, any data that is not valid like emojis will be replaced with ?. On the latin1 it replaces 😀 with one ?. On mb3 fields you will see 😀 replaced with ????. I think this is better than having things like serialized data breaking due to failed characters. It also allows for a bit of a stop gap in switching all data over.

Why not convert everything now?

Right now there are a few conversions blocked by foreign key constraints and we will need to navigate those tables differently. We also have latin1 instead of mb3/4, the data should convert properly from what I can tell however extra testing will need to be had.

Testing

There is a database change so you will need to run the database updater if manually testing.
When testing use special characters like ALT+0233 as well as the emoji keyboard (https://support.microsoft.com/en-us/windows/windows-keyboard-tips-and-tricks-588e0b72-0fff-6d3f-aeee-6e5116097942).

The original issue was with form grids and emojis. The smiley face would break the serialized data so any data after the emoji would not be saved.

Will need to work with testing team for tests since I am not sure of the best approach at this exact moment.

Automated Test

department-of-veterans-affairs/LEAF-Automated-Tests#22

shane added 2 commits November 22, 2024 12:23
…a set since we will want to also test the data going into the dbs and make sure they display properly as well
… testing thing I was trying out. Need to figureo ut how to write tests for this one
@Pelentan Pelentan added the With QA Ticket is to QA. No changes unless pulled back to in progress label Dec 16, 2024
@Pelentan Pelentan changed the base branch from master to rc/2024-12-19/Sprint-86-c2 December 19, 2024 13:21
@Pelentan Pelentan merged commit 04a622b into rc/2024-12-19/Sprint-86-c2 Dec 19, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
With QA Ticket is to QA. No changes unless pulled back to in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants