0

When using list.files()

The following list appears:

  • "Ange´lica Cotta.xlsx"
  • "Ivonildo José.xlsx"
  • "Raquel Araújo.xlsx"

For the following files:

  • Angélica Cotta.xlsx
  • Ivonildo José.xlsx
  • Raquel Araújo.xlsx
Falnésio
  • 125
  • 1
  • 9
  • please add a [minimal working example](https://stackoverflow.com/help/mcve) – bob1 Mar 21 '19 at 21:56
  • Check this answer: [Manipulating files with non-English names in R](https://stackoverflow.com/questions/24354375/manipulating-files-with-non-english-names-in-r). – divibisan Mar 21 '19 at 21:56
  • I cannot reproduce this. I took both versions of Angelica above, created files and put something in them, then found them with `list.files` (correct names!), then read them with `readLines` (since all I put in was text). Win10, R-3.5.3, x86_64. If there's something I'm missing in this (highly likely!), then please do as @bob1 suggested: provide a reproducible example. (That is, if divibisan's comment doesn't help.) – r2evans Mar 21 '19 at 23:43
  • I have tried to reproduce the error with my example and I have not been able to, same as bob1 and r2evans. I have no idea where the problem could be located. Do you have any suggestions? How could this happen in one folder but not another? – Falnésio Mar 22 '19 at 13:00
  • Copying the exact file, the problem occurs, but when creating a file with Angélica it does not. Also, when copying and pasting these two files to same folder, windows says both files have the same name and interrupts action. Tried it again, and no interruption. Powershell ls output: "Ange´lica Cotta.xlsx" and "Angélica Cotta.xlsx". When trying to rename file with error, while going to delete the é, the accent gets deleted first, then the e. Error does not occur on Ubuntu (latest stable version), and R version 3.4.4 – Falnésio Mar 22 '19 at 13:34
  • Using read_excel function from readxl library gives out the error that states that the file path does not exist for file "Ange´lica Cotta.xlsx". Forgot to mention above that list.files function gives same output as powershell. – Falnésio Mar 22 '19 at 13:45
  • Where did you get those specific files? The fact that files whose names look identical work, but those don't, makes me think that the broken files make those accents using some unusual Unicode (ie, it's not actually the normal `é`). – divibisan Mar 22 '19 at 16:13
  • @divibisan The files most likely were created on an old windows machine, maybe windows 7, most likely XP. They were most likely built directly on excel. I believe you may be right because I have no better explanation. You think the only way to solve this problem would be to rename this file and any other possible one with this bug manually as they appear when there is an error on R when pulling them? – Falnésio Mar 22 '19 at 21:42

0 Answers0