Skip to content

Commit 3d47402

Browse files
krlmlrlionel-
authored andcommitted
Try setting LC_ALL
1 parent 9b78aee commit 3d47402

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/local.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,11 @@ local_reproducible_output <- function(width = 80,
133133
.local_envir = .env
134134
)
135135

136-
if (isTRUE(capabilities("NLS")) && !(Sys.getenv("LANG") %in% c("C", "C.UTF-8"))) {
137-
withr::local_language(lang, .local_envir = .env)
136+
if (isTRUE(capabilities("NLS"))) {
137+
if (!(Sys.getenv("LANG") %in% c("C", "C.UTF-8"))) {
138+
withr::local_language(lang, .local_envir = .env)
139+
}
140+
withr::local_envvar(c(LC_ALL = "en_GB"), .local_envir = .env)
138141
}
139142

140143
withr::local_collate("C", .local_envir = .env)

0 commit comments

Comments
 (0)