r-hub / containers

Docker containers for R-hub
https://r-hub.github.io/containers/
15 stars 4 forks source link

Is it possible to run ubuntu-gcc12 with UTF8? #62

Closed jonkeane closed 5 months ago

jonkeane commented 5 months ago

Looking at the container info it looks like this container is running as ascii and not UTF-8. Is it possible to run this container as UTF-8? I saw https://github.com/r-hub/containers/commit/a559d410624ccd2b0cfabf597517a4f48e352ba9 which looked like it added it, and I see other containers like gcc13 that work. But maybe I'm not setting the correct env var or something?

R session information

...
locale:
[1] C
...

R localization

> l10n_info()
$MBCS
[1] FALSE

$`UTF-8`
[1] FALSE

$`Latin-1`
[1] FALSE

$codeset
[1] "ANSI_X3.4-1968"
gaborcsardi commented 5 months ago

Yeah, do this:

root@994228b61ca2:~# locale-gen en_US.UTF-8
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
root@994228b61ca2:~# export LANG=en_US.UTF-8
root@994228b61ca2:~# R
...
> l10n_info()
$MBCS
[1] TRUE

$`UTF-8`
[1] TRUE

$`Latin-1`
[1] FALSE

$codeset
[1] "UTF-8"

Seems like the corresponding machines are now UTF-8 on CRAN, so we should also change the defaults on this container.

gaborcsardi commented 5 months ago

Changed to C.UTF-8 here: 5c56aa29ee4ec682080a2a0336177473423d9358, should be live tomorrow.

jonkeane commented 5 months ago

Thank you for the quick response!

gaborcsardi commented 5 months ago

OK, this is now deployed.