problems reading files and directories in portuguese

Hello,

Whenever we try to open files in our language, Portuguese BR, we see some broken letters, as in the image below, Appearing as "?"

The application also cannot find directories that contain accents, for example, the desktop in Portuguese is called "área de trabalho" and the application does not find the "Á"

How to fix the application so that it identifies characters like "Á", "Ã" and "Ç"?

Hi Rafael. welcome to the forum.

This issue has come up here a number of times recently.
Assuming you are using Windows this discussion may help.

It likely would help if you could paste the output of sessionInfo() here.

Hi, thanks for the reply,

But how could I make the correction?

I believe you would need to change the code page but I have no idea how. I am a Linux user. If you post your sessionInfo() output a Windows user should be able to help you.

Hi @jrkrideau, you need put in R the correct Unicode Transformation Format (UTF)
This is and example:

wd <- "C:/Users/documents/Opinião/"

# Get all questionnaires 

filenames <- list.files(path = paste0(wd,"Questionarios/"), pattern="*.csv$", full.names = TRUE)
Encoding(filenames) <- "UTF-8"

Im speak Spanish and use this for select the ñ letter. But Im try not use ñ.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.