Fix fread clipboard handling on Windows (fixes #1292)#7640
Open
AmanKashyap0807 wants to merge 2 commits intoRdatatable:masterfrom
Open
Fix fread clipboard handling on Windows (fixes #1292)#7640AmanKashyap0807 wants to merge 2 commits intoRdatatable:masterfrom
AmanKashyap0807 wants to merge 2 commits intoRdatatable:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
Hi @MichaelChirico, I’ve synced the branch with master. Let me know if there’s anything else I should do on my end to help resolve these! |
joshhwuu
reviewed
Feb 12, 2026
| }) | ||
| } else { | ||
| # Note: macOS (pbpaste) and Linux (xclip/xsel) support discussed in #1292 | ||
| stopf("Clipboard reading is supported on Windows only.") |
Member
There was a problem hiding this comment.
i wonder if we must stopf here
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.
Closes #1292
Fix fread clipboard handling on Windows using
readClipboard(), add test (#2366), and update NEWS.Changed files :
clipboardinputs on Windows, reading it by using readClipboard(), handle errors and process clipboard content as a temporary file for parsing.To keep the scope of issue #1292, I only solved it for Windows. I'd be happy to submit another PR for macOS and Linux later.
Reproduction:
fread()does not recognize"clipboard"/"clipboard-128"as clipboard input on Windows. Due to the long period since the issue was reported, there might have been some changes in fread() over time, which is why the error message differs now, but the core problem is the same, clipboard input is not detected.Environment:
Please let me know if any changes are needed.