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

UTF-8 path fails in older R versions, on Windows #264

Closed
gaborcsardi opened this issue Aug 6, 2020 · 1 comment
Closed

UTF-8 path fails in older R versions, on Windows #264

gaborcsardi opened this issue Aug 6, 2020 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

This is R 3.6.3 on Windows 10.

  local_temp_dir()
  name <- "./\u00fa\u00e1\u00f6\u0151\u00e9.exe"
  # Older dir.create does not handle UTF-8 correctly
  if (getRversion() < "4.0.0") {
    dir.create(enc2native(name))
  } else {
    dir.create(name)
  }
  px <- get_tool("px")
  exe <- file.path(name, "px.exe")
  if (getRversion() < "4.0.0") {
    file.copy(px, enc2native(exe))
  } else {
    file.copy(px, exe)
  }
  out <- run(
    exe,
    c("out", "hello", "return", 10),
    error_on_status = FALSE
  )
#> Error in rethrow_call(c_processx_exec, command, c(command, args), stdin,  :
#>   Command './úáöoé.exe/px.exe' not found @win/processx.c:994 (processx_exec)
#> Type .Last.error.trace to see where the error occured
@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Aug 6, 2020
@gaborcsardi
Copy link
Member Author

Closed by #265.

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

1 participant