Ivan Krylov
2023-Aug-11 11:24 UTC
[Rd] R-4.3 version list.files function could not work correctly in chinese
Dear ???, Thank you for your message, but please follow the posting guide in your future messages: https://www.r-project.org/posting-guide.html https://www.r-project.org/bugs.html I understand from your link that list.files() ends up skipping some Chinese filenames in R-4.3.1 (but not R-4.2.2) on Windows, but would you (or perhaps Yihui Xie who I see is also participating in the discussion) mind translating the rest of your findings into English? Have you been able to narrow down the problem to certain character ranges, for example? -- Best regards, Ivan
Yihui Xie
2023-Aug-12 04:40 UTC
[Rd] R-4.3 version list.files function could not work correctly in chinese
Yes, I participated in the discussion. Basically dir() failed to list all files since R 4.3.0 when filenames start with Chinese characters. I don't have a Windows machine to test it, but this might be a minimal reproducible example: file.create("????.R") dir() The OP said dir() would return "????.R" in R.4.2.2 but not in R 4.3.0. In the same discussion another person mentioned that the problem could also be related to the file encoding, i.e., if the file content is encoded in UTF-8, it could be recognized by dir(), but not in ANSI. Regards, Yihui -- https://yihui.org On Fri, Aug 11, 2023 at 6:25?AM Ivan Krylov <krylov.r00t at gmail.com> wrote:> Dear ???, > > Thank you for your message, but please follow the posting guide in your > future messages: https://www.r-project.org/posting-guide.html > https://www.r-project.org/bugs.html > > I understand from your link that list.files() ends up skipping some > Chinese filenames in R-4.3.1 (but not R-4.2.2) on Windows, but would you > (or perhaps Yihui Xie who I see is also participating in the discussion) > mind translating the rest of your findings into English? Have you been > able to narrow down the problem to certain character ranges, for > example? > > -- > Best regards, > Ivan > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
Apparently Analagous Threads
- R-4.3 version list.files function could not work correctly in chinese
- R-4.3 version list.files function could not work correctly in chinese
- R-4.3 version list.files function could not work correctly in chinese
- R-4.3 version list.files function could not work correctly in chinese
- Open a file which name contains a tilde