Closed maelle closed 6 years ago
does it still mess up if you assign it to an object and then unclass it? wonder if the print statement messes it up, or if it's already messed up
hmmm not sure what you mean.
The actual context in which I noticed this was using https://github.com/ropenscilabs/ghrecipes/blob/master/R/get_master_committers.R for ropensci/codemetar
like
z <- jqr::jq(x, ".[].name")
unclass(z)
x <- '[{"message": "hello", "name": "Maëlle"},
{"message": "world", "name": "beth"}]'
z <- jqr::jq(x, ".[].name")
unclass(z)
#> [1] "\"Ma�lle\"" "\"beth\""
Created on 2018-04-23 by the reprex package (v0.2.0).
bummer, will see where that's happening.
I am the truffle hog of Windows encoding issues 🐷
Thanks Ma�lle! 🐗
I've noticed this when parsing GitHub API V4 results with my name in it. 😢 Minimal example:
Created on 2018-04-23 by the reprex package (v0.2.0).
Session info
``` r devtools::session_info() #> Session info ------------------------------------------------------------- #> setting value #> version R version 3.4.4 (2018-03-15) #> system x86_64, mingw32 #> ui RTerm #> language (EN) #> collate English_United States.1252 #> tz Europe/Paris #> date 2018-04-23 #> Packages ----------------------------------------------------------------- #> package * version date source #> backports 1.1.2 2017-12-13 CRAN (R 3.4.3) #> base * 3.4.4 2018-03-15 local #> compiler 3.4.4 2018-03-15 local #> datasets * 3.4.4 2018-03-15 local #> devtools 1.13.5 2018-02-18 CRAN (R 3.4.3) #> digest 0.6.15 2018-01-28 CRAN (R 3.4.3) #> evaluate 0.10.1 2017-06-24 CRAN (R 3.4.3) #> graphics * 3.4.4 2018-03-15 local #> grDevices * 3.4.4 2018-03-15 local #> htmltools 0.3.6 2017-04-28 CRAN (R 3.4.0) #> jqr 1.0.0 2017-09-28 CRAN (R 3.4.3) #> jsonlite 1.5.9000 2018-04-23 Github (jeroen/jsonlite@ae0ef71) #> knitr 1.20 2018-02-20 CRAN (R 3.4.4) #> lazyeval 0.2.1 2017-10-29 CRAN (R 3.4.2) #> magrittr 1.5 2014-11-22 CRAN (R 3.4.0) #> memoise 1.1.0 2017-04-21 CRAN (R 3.4.0) #> methods * 3.4.4 2018-03-15 local #> Rcpp 0.12.16 2018-03-13 CRAN (R 3.4.4) #> rmarkdown 1.9 2018-03-01 CRAN (R 3.4.4) #> rprojroot 1.3-2 2018-01-03 CRAN (R 3.4.3) #> stats * 3.4.4 2018-03-15 local #> stringi 1.1.7 2018-03-12 CRAN (R 3.4.4) #> stringr 1.3.0.9000 2018-02-28 Github (tidyverse/stringr@097c0c0) #> tools 3.4.4 2018-03-15 local #> utils * 3.4.4 2018-03-15 local #> withr 2.1.2 2018-03-15 CRAN (R 3.4.4) #> yaml 2.1.18 2018-03-08 CRAN (R 3.4.4) ```