[R] Installin R in non-ascii path

Roman Savchenko gm@t|m@ @end|ng |rom gm@||@com
Tue Aug 12 15:07:11 CEST 2025


Hi all,

I'm looking for some help to understand if I'm missing anything.

I installed R 4.5.1 on Windows 11 (with Japanese locale), to a path that
includes Japanese characters: C:/日本. I'm also explicitly setting the locale
using: Sys.setlocale("LC_ALL", "Japanese")

Here’s what I get from locale-related functions:

Sys.getlocale() returns:
LC_COLLATE=Japanese_Japan.932;
LC_CTYPE=Japanese_Japan.932;
LC_MONETARY=Japanese_Japan.932;
LC_NUMERIC=C;
LC_TIME=Japanese_Japan.932

l10n_info() returns:
$MBCS = TRUE
$UTF-8 = FALSE
$Latin-1 = FALSE
$codepage = 932
$system.codepage = 65001

>From this setup, I would expect that everything should work fine - the path
is compatible with code page 932, and locale settings appear to be
correctly applied.

However, when I try to install a package, I get this error:

install.packages("stringi")
Error: cannot open file 'C:/日本/library/utils/R/utils.rdb': Illegal byte
sequence

Does anyone know what might be going wrong here?

P.S. I know that for that system I may use UTF-8 (e.g. Japanese.UTF-8), but
I *need to have* 932 for compatibility.

Best regards,
Roman.

	[[alternative HTML version deleted]]



More information about the R-help mailing list