Skip to content

Commit 5ec5a03

Browse files
committed
Encode as UTF-8
1 parent 7fbed98 commit 5ec5a03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

R/path.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ path <- function(...) {
1313
}
1414

1515
# Side effect: check recycling rules
16-
components <- as.data.frame(dots, stringsAsFactors = FALSE)
16+
component_df <- as.data.frame(dots, stringsAsFactors = FALSE)
1717

18-
missing <- apply(is.na(components), 1, any)
18+
missing <- apply(is.na(component_df), 1, any)
19+
20+
components <- lapply(component_df, function(x) enc2utf8(as.character(x)))
1921

2022
out <- do.call(file.path, components)
2123
out[missing] <- NA_character_

0 commit comments

Comments
 (0)