Skip to content
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

path_real() garbles non-ascii characters in non-UTF-8 locale #383

Open
jennybc opened this issue May 17, 2022 · 2 comments
Open

path_real() garbles non-ascii characters in non-UTF-8 locale #383

jennybc opened this issue May 17, 2022 · 2 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@jennybc
Copy link
Member

jennybc commented May 17, 2022

Very similar to #366

On Windows with 4.1.2.

Discovered while starting to poke around r-lib/devtools#2422. All package/project paths are pre-processed with fs::path_real() in usethis, so this bug is quite painful.

library(fs)

dir_create("f\u00F6\u00F6")

(x <- list.files(pattern = "^f"))
#> [1] "föö"

path_abs(x)
#> C:/Users/jenny/AppData/Local/Temp/RtmpyQS9MB/reprex-88c664c3346-vain-paca/föö

path_real(x)
#> C:/Users/jenny/AppData/Local/Temp/RtmpyQS9MB/reprex-88c664c3346-vain-paca/föö

Created on 2022-05-17 by the reprex package (v2.0.1)

@jennybc
Copy link
Member Author

jennybc commented May 17, 2022

devtools::as.package() also processes every path through path_real(), so again, pretty painful on Windows + R < 4.2.

@clemenskuehn
Copy link

clemenskuehn commented Jun 7, 2022

Coming back from devtools#2422, the issue also persists with R 4.2 for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants