Skip to content

Commit 4d97d8e

Browse files
committed
Try setting LC_ALL
1 parent dda1246 commit 4d97d8e

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)