Just to rule it out... is it possible that R is listing these files
successfully, but is not printing the Chinese characters in those
names for some reason?

Using your example, what is the output of:

    f <- list.files(a, recursive = T)
    nchar(f)

Does the reported number of characters match what you see?

Best,
Kevin

On Mon, Aug 14, 2023 at 12:32 AM 叶月光 <yeyuegu...@goldwind.com> wrote:
>
> Rterm.exe  test result。
>
> > a  =  readline()
> D:\Project_Delivery\
> >
> >
> >  list.files(a,recursive = T)
> [1] "2022(1).xlsx"
> [2] "conf_custom_wf_wt_map_202308091545.csv"
> [3] ".R"
> [4] ".xlsx"
> [5] "_.xlsx"
> [6] ".xlsx"
> [7] " (3).xlsx"
> [8] "20230222113605379(1).xlsx"
> [9] "_2022_20230811.docx"
>
> All  the file names which contains the Chinese  can not be printed.
> The result of RGUI and RStudio are the same:
>
>
> > a  =  readline()
> D:\Project_Delivery\广核
> >
> >
> >  list.files(a,recursive = T)
> [1] "2022年度金风慧能第三方模型预警明细表(1).xlsx" "conf_custom_wf_wt_map_202308091545.csv"
>
>
> 发件人: yu gong [mailto:yug...@outlook.com]
> 发送时间: 2023年8月13日 17:36
> 收件人: 叶月光 <yeyuegu...@goldwind.com>; r-devel@r-project.org
> 主题: Re: R-4.3 version list.files function could not work correctly in chinese
>
> Could you test it on RGui and Rterm first, see it work or not. then try 
> RStudio?
>
> ________________________________
> From: R-devel 
> <r-devel-boun...@r-project.org<mailto:r-devel-boun...@r-project.org>> on 
> behalf of 叶月光 <yeyuegu...@goldwind.com<mailto:yeyuegu...@goldwind.com>>
> Sent: Friday, August 11, 2023 11:41
> To: r-devel@r-project.org<mailto:r-devel@r-project.org> 
> <r-devel@r-project.org<mailto:r-devel@r-project.org>>
> Subject: [Rd] R-4.3 version list.files function could not work correctly in 
> chinese
>
>      ��ã�
>           
> ����R-4.3�汾�����°汾��R������list.files������ȡ����ȫ���ļ���Ϣ��BUG�����ж���û��ᵽ������⣬ϣ���Ľ���
> r4.3�汾��dir������ȡ����ȫ���ļ� - COS��̳ | ͳ��֮�� | ͳ�������ݿ�ѧ��̳ 
> (cosx.org)<https://d.cosx.org/d/424356-r43ban-ben-zhong-dirhan-shu-huo-qu-bu-liao-quan-bu-wen-jian/11><ttps://d.cosx.org/d/424356-r43ban-ben-zhong-dirhan-shu-huo-qu-bu-liao-quan-bu-wen-jian/11%3e>
>           �����������ļ��б��ȡ��ʱ��
>
>         [[alternative HTML version deleted]]
> 以下内容是邮件系统安全提示:
> 在电子邮件中索要个人信息、账号密码、银行卡信息、求助、补助、钱款转账等情况为“钓鱼邮件”或者“病毒邮件”,无需响应,并请立即删除。
> 如遇到邮件安全问题,请联系数字化中心 itsecur...@goldwind.com。
>
> ———————————————
> Email system security tips:
> The use of emails to collect personal information, account passwords, bank 
> card information, help, subsidies, money transfers, etc. is "phishing email" 
> or "virus email", no response is required, and please delete it immediately.
> If you encounter email security issues, please contact 
> itsecur...@goldwind.com.<mailto:tsecur...@goldwind.com.>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to