Skip to content

Commit

Permalink
Unconditionally encode paths as UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed May 8, 2022
1 parent 000790d commit bdecf47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/path.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ standardise_path <- function(path) {
}
}

as.list(path)
as.list(enc2utf8(path))
}

standardise_one_path <- function (path, write = FALSE) {
Expand Down Expand Up @@ -140,6 +140,8 @@ standardise_one_path <- function (path, write = FALSE) {
stop("Can only read from, not write to, .zip", call. = FALSE)
}

path <- enc2utf8(path)

switch(compression,
gz = gzfile(path, ""),
bz2 = bzfile(path, ""),
Expand Down

0 comments on commit bdecf47

Please sign in to comment.