Skip to content

[release/10.0] Restoring autoConvert behavior in Clipboard APIs - #14982

Merged
Shyam-Gupta merged 1 commit into
release/10.0from
backport/pr-14893-to-release/10.0
Aug 26, 2026
Merged

Shyam-Gupta merged 1 commit into
release/10.0from
backport/pr-14893-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

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

* 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]>
@github-actions
github-actions Bot requested a review from a team as a code owner August 25, 2026 20:37
@Shyam-Gupta Shyam-Gupta self-assigned this Aug 25, 2026
@Shyam-Gupta Shyam-Gupta added servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria area-Clipboard Issues related to Clipboard labels Aug 25, 2026
@Shyam-Gupta Shyam-Gupta modified the milestone: .NET 11 Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.07919%. Comparing base (c276f7e) to head (a6c8028).
⚠️ Report is 1 commits behind head on release/10.0.

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     
Flag Coverage Δ
Debug 77.07919% <90.00000%> (-0.02918%) ⬇️
integration 18.83619% <0.00000%> (-0.15128%) ⬇️
production 51.86366% <82.35294%> (-0.06600%) ⬇️
test 97.40998% <100.00000%> (+0.00007%) ⬆️
unit 49.34521% <82.35294%> (+0.00278%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Shyam-Gupta Shyam-Gupta added servicing-approved .NET Shiproom approved the PR for merge and removed servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria labels Aug 26, 2026
@Shyam-Gupta

Copy link
Copy Markdown
Member

Approved over email.

@Shyam-Gupta
Shyam-Gupta merged commit 4af0dd0 into release/10.0 Aug 26, 2026
8 checks passed
@Shyam-Gupta
Shyam-Gupta deleted the backport/pr-14893-to-release/10.0 branch August 26, 2026 21:11
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Clipboard Issues related to Clipboard servicing-approved .NET Shiproom approved the PR for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants