From yugong @end|ng |rom out|ook@com  Sun Aug 13 11:28:19 2023
From: yugong @end|ng |rom out|ook@com (yu gong)
Date: Sun, 13 Aug 2023 09:28:19 +0000
Subject: [Rd] 
 R-4.3 version list.files function could not work correctly in
 chinese
In-Reply-To: <CANROs4ePK4YW_YoEg4erpTQYKPNKGOoQvBJv6ZW8OtHSvCOOMA@mail.gmail.com>
References: <16b91252fd33452f890fcce439921a63@goldwind.com>
 <20230811142435.770c2037@parabola>
 <CANROs4ePK4YW_YoEg4erpTQYKPNKGOoQvBJv6ZW8OtHSvCOOMA@mail.gmail.com>
Message-ID: <TYAP286MB0268632D5A9C631427F53462D116A@TYAP286MB0268.JPNP286.PROD.OUTLOOK.COM>

I am afraid this issue a bite more complicated.
Test Rgui and Rterm 4.3.1 and svn trunk on Windows 10 x64 (build 19044) , Chinese file name shows correctly (file content ANSI or UTF-8 ).
I saw OP picture (using Rstudio), maybe this is Rstudio issues?





________________________________
From: R-devel <r-devel-bounces at r-project.org> on behalf of Yihui Xie <xie at yihui.name>
Sent: Saturday, August 12, 2023 12:40
To: Ivan Krylov <krylov.r00t at gmail.com>
Cc: r-devel at r-project.org <r-devel at r-project.org>; ??? <yeyueguang at goldwind.com>
Subject: Re: [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]]

______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

	[[alternative HTML version deleted]]



[Rd] R-4.3 version list.files function could not work correctly in chinese
yu gong