[release/11.0] Restoring autoConvert behavior in Clipboard APIs - #11895
Open
github-actions[bot] wants to merge 1 commit into
Open
[release/11.0] Restoring autoConvert behavior in Clipboard APIs#11895github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
* Restoring autoConvert to .NET 8.0 in Clipboard APIs * Added unit test * Also setting autoConvert to false in one of the TryGetData overload. * Formatting
Member
|
@pranav-gupta-msft, @dipeshmsft, @subhajitm This change is already merged in main and release/10.0 branch. Requesting your approval to merge it in release/11.0. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #11837 to release/11.0
Fixes mojibake character issue in dotnet/winforms#14322
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 bug dotnet/winforms#14322
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 WPF 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