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

Relax the prohibition on setting LC_ALL #119

Open
jennybc opened this issue Jul 18, 2019 · 0 comments
Open

Relax the prohibition on setting LC_ALL #119

jennybc opened this issue Jul 18, 2019 · 0 comments
Labels
feature a feature request or enhancement

Comments

@jennybc
Copy link
Member

jennybc commented Jul 18, 2019

Motivated by some work I'm doing in reprex.

It would be nice to relax this prohibition in [with|local]_locale():

https://github.com/r-lib/withr/blob/master/R/locale.R#L6-L8

Have discussed in Slack with @jimhester and we think it's not that difficult and is worth doing. Capturing that convo here.

From the docs:

Note that setting category "LC_ALL" sets only categories "LC_COLLATE", "LC_CTYPE", "LC_MONETARY" and "LC_TIME".

You can't just take the output of Sys.getlocale() and roundtrip it straight into Sys.setlocale(). Instead, it will look more like:

... detect LC_ALL and convert it to stats::setNames(rep(my_new_locale, 4), c("LC_COLLATE", "LC_CTYPE", "LC_MONETARY", "LC_TIME"))

@jimhester jimhester added the feature a feature request or enhancement label Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants