[R] path.expand fails on some windows platform

Manuel Muñoz Márquez m@nue|@munoz@m@rquez @end|ng |rom gm@||@com
Wed Jul 8 23:54:54 CEST 2026


Hi Iva,

As far as I understand in the cited bug path.expand return an string, maybe not the correct one, but in the case I reported path.expand
fails giving an error message.

Best, Manuel.

El mié, 08-07-2026 a las 21:21 +0300, Ivan Krylov escribió:
> Dear Manuel Muñoz Márquez,
> 
> 8 july 2026 18:32:07 GMT+03:00, "Manuel Muñoz Márquez"
> <manuel.munoz.marquez using gmail.com> wrote:
> 
> > Dear all.
> > 
> > When using R version 4.6.1 on certain Windows platforms where the
> > username contains non-ASCII characters (such as "á"), the command:
> > path.expand("~") fails with the following error:
> > Error: file name conversion problem -- name too long?
> > 
> > This occurs when the Windows OS does not define the R_USER environment
> > variable. In these cases, a call to Sys.getenv("R_USER") returns an
> > empty string ("").
> 
> Yes, this is a bug: https://bugs.r-project.org/show_bug.cgi?id=18949
> 
> The encoding conversion function that should be returning UTF-8 is
> called too early in the process startup, so it converts the home
> directory path to the wrong encoding (ANSI).
> 



More information about the R-help mailing list