Repository navigation
[release/10.0] Restoring autoConvert behavior in Clipboard APIs - #14982
Merged
Merged
Conversation
* Fixes mojibake character issue in bug #14322 Issue: Till .NET 9.0, autoConvert was set to true only for FileDrop and Bitmap scenarios. However, since .NET 10, it is being set to true for GetAudioStream, GetFileDropList, GetImage, and GetText APIs inside the private method GetTypedDataIfAvailable. This causes issues with GetText API with mojibake characters as described in the bug. Fix: Just like 9.0, setting autoConvert = true only for FileDrop and Bitmap data formats. * Parameter list formatting Co-authored-by: Copilot Autofix powered by AI <[email protected]> --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/10.0 #14982 +/- ##
======================================================
- Coverage 77.10837% 77.07919% -0.02918%
======================================================
Files 3273 3274 +1
Lines 645083 645095 +12
Branches 47708 47709 +1
======================================================
- Hits 497413 497234 -179
- Misses 143994 144189 +195
+ Partials 3676 3672 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
JeremyKuhne
approved these changes
Aug 26, 2026
Member
|
Approved over email. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #14893 to release/10.0
Fixes mojibake character issue in #14983
Description
Till .NET 9.0, autoConvert was set to true only for FileDrop and Bitmap scenarios. However, since .NET 10, it is being set to true for GetAudioStream, GetFileDropList, GetImage, and GetText APIs inside the private method GetTypedDataIfAvailable. This causes issues with GetText API with mojibake characters as described in the bug.
Customer Impact
There is no way for the app to know whether the clipboard contents were corrupted or if there is any problem with the API as it didn't get the desired data.
Regression
Yes - from .NET 9.0
Testing
Created a WinForms app to write unicode data on the clipboard and another app to read it. Before the changes, the reader app returned several hits for mojibake characters. After fix, there were none.
Risk
This should be a very low risk change as this behavior was working fine in 9.0 and previous versions.
Microsoft Reviewers: Open in CodeFlow