-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding issue: the results with non-ASCII symbols were not reproduced #197
Comments
Possibly related? #82 |
This is the issue laid in R core and is hard to fix on the packages' side...😢 |
Are there any chances that the issue will be solved by the R Core Team? |
Related issue (with a Hebrew example): tidyverse/tibble#433 |
When changing the locale with Sys.setlocale(locale = "English")
#> [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
print("ö")
#> [1] "ö" Now with a second call (I “reprexed” the part above and then everything from here on down separately. ) Sys.setlocale(locale = "English")
#> [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
print("v")
#> [1] "<f6>"
Sys.setlocale(locale = "C")
#> [1] "C" I think is what causes @GegznaV’s problem. I am not sure, though, whether this is really related to the other issues mentioned above. BTW, “ö” should not get converted to “v” but to “U+00F6”, IMO, but that might be a bug in base R. |
I think between:
reprex is handling encoding as well as its dependencies allow (mostly especially the difficulties around encoding on Windows in R itself). I'm closing this. If anyone has a new challenging example, especially one that fails with dev reprex + knitr v1.23, please add it to #262. I don't consider these reprexes that change the locale mid-reprex to be fair game, unless one can show that rmarkdown/knitr handles that code correctly, but reprex does not. |
I use RStudio on Windows 10. I selected these lines from my
.Rmd
file:Called the
reprex
RStudio add-in (for selection of R code to be printed on GitHub) and got this result (pay attention to non-ASCII symbolsĄ
, etc.):Created on 2018-07-14 by the reprex package (v0.2.0).
The result had to be an error:
This behavior may be related to this issue.
The text was updated successfully, but these errors were encountered: