Skip to content

refactor(developer): replace deprecated std::codecvt_utf8_utf16 🐾#14369

Merged
ermshiperete merged 2 commits intomasterfrom
refactor/developer/codecvt
Jul 18, 2025
Merged

refactor(developer): replace deprecated std::codecvt_utf8_utf16 🐾#14369
ermshiperete merged 2 commits intomasterfrom
refactor/developer/codecvt

Conversation

@ermshiperete
Copy link
Copy Markdown
Contributor

codecvt is deprecated in C++ 17. See also #12107.

Test-bot: skip

@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Jul 17, 2025

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S7 milestone Jul 17, 2025
@ermshiperete ermshiperete changed the title refactor(developer): replace deprecated std::codecvt_utf8_utf16 refactor(developer): replace deprecated std::codecvt_utf8_utf16 🐾 Jul 17, 2025
Copy link
Copy Markdown
Contributor

@SabineSIL SabineSIL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from refactor/common/warnings to master July 18, 2025 06:39
codecvt is deprecated in C++ 17. See also #12107.

Test-bot: skip
@ermshiperete ermshiperete force-pushed the refactor/developer/codecvt branch from d9843e0 to 6930fe9 Compare July 18, 2025 06:43
@ermshiperete ermshiperete merged commit 69f6851 into master Jul 18, 2025
8 checks passed
@ermshiperete ermshiperete deleted the refactor/developer/codecvt branch July 18, 2025 12:02
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Jul 18, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.85-alpha

return result.size() > 0 && result[0] == 0xFEFF;
}

bool isValidUtf8(KMX_BYTE* str, int sz) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fairly complex function seems to be very lightly tested. Is it original code or copied from somewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes, unit tests would be good 😄 I copied it from somewhere and reviewed it carefully, but nevertheless it should have unit tests. Done in #14381.

ermshiperete added a commit that referenced this pull request Jul 21, 2025
ermshiperete added a commit that referenced this pull request Jul 29, 2025
test(developer): add unit tests for `isValidUtf8`
Follow-up-of: #14369
cvosoft pushed a commit to cvosoft/keyman that referenced this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants