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.r...@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@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel