Hello,

I'm encountering what seems to be a bug when using the `writeClipboard()` 
function in the R {utils} package.
When I try to copy text to the clipboard, I notice that I get extra characters 
when I try to paste it (by hand with CTRL+V or with the `readClipboard()` 
function from R packages {utils}).

Here's my example:

``` r
utils::writeClipboard("plot(AirPassengers)")
for (k in 1:10) {
    print(utils::readClipboard())
}
#> [1] "plot(AirPassengers)" "⤀攀"
#> [1] "plot(AirPassengers)" "\u0a00"
#> [1] "plot(AirPassengers)" "\xed\xb0\x80ư"
#> [1] "plot(AirPassengers)"
#> [1] "plot(AirPassengers)"
#> [1] "plot(AirPassengers)"
#> [1] "plot(AirPassengers)"
#> [1] "plot(AirPassengers)"
#> [1] "plot(AirPassengers)" "⤀"
#> [1] "plot(AirPassengers)"
Message d'avis :
Dans utils::readClipboard() : unpaired surrogate Unicode point dc00
```

So I don't always get the same result.
I opened a problem in the {clipr} GitHub repository before realizing it's a 
{tools} problem: https://github.com/mdlincoln/clipr/issues/68

Is this a bug or something I haven't configured properly?


Thank you very much


Tanguy BARTHELEMY


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to