使用以上代码读取D盘t文件夹下的文件,由于CSV文件含有中文名,出现以下信息:
Error in file(file, "rt") : cannot open the connection In addition: Warning message:
In file(file, "rt") :
cannot open file 'd:/t/331-2一票通 07.csv': No such file or directory
变量dir中出现乱码:
但将文件名改为英文就行了。
可问题是我2个月前用过相同的程序,当时是可以读取含中文名文件的,为啥现在不行了?有什么解决方法吗?