edirpedro
By:
edirpedro

Error to access File and Directory names with accents

September 15, 2014 1.9k views

I have a documentation tool daux.io that uses directory and file names as titles, like /docs/Catálogo/Extensões.md, so I need to write with accents, but it makes files and directories not accessible to other tools like FTP transfer, they doesn't transfer these files because they got error trying to open directory. Looking at directory I see a different name /docs/Cata'logo/Extenso~es.md. Can I solve this?

2 comments
  • What FTP client are you using? Also make sure you are using a UTF-8 locale on the server side.

  • Transmit and GoodSync, both doesn't work with that folders. I found something about locale, but I got confused because people say to use pt_BR.ISO-8859-1 that is a Windows like to my language, but checking my hosts they to not use this configuration, I don't recognize many things. And i'm worried about change to ISO and corrupt the website that is written in UTF.

2 Answers

The FTP protocol only supports ASCII and UTF-8 encodings.

The output of the locale command will show you what you are currently using:

# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

To change the locale, run:

sudo locale-gen pt_BR.UTF-8
sudo update-locale LANG=pt_BR.UTF-8 LANGUAGE:pt_BR:pt
Have another answer? Share your knowledge.