Re: path.expand fails on some windows platform
Manuel Muñoz Márquez <[email protected]> Wed, 08 Jul 2026 23:54:54 +0200
| Newsgroups | gmane.comp.lang.r.general |
|---|---|
| Message-ID | <[email protected]> |
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=C3=A9, 08-07-2026 a las 21:21 +0300, Ivan Krylov escribi=C3=B3: > Dear Manuel Mu=C3=B1oz M=C3=A1rquez, > = > 8 july 2026 18:32:07 GMT+03:00, "Manuel Mu=C3=B1oz M=C3=A1rquez" > <[email protected]> wrote: > = > > Dear all. > > = > > When using R version 4.6.1 on certain Windows platforms where the > > username contains non-ASCII characters (such as "=C3=A1"), 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=3D18949 > = > 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). > =