Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I manage a website that is based on directory listings (

The website is in French, and many of the urls contain accents:

/leçon 1 - identification & vocabulaire.html

I would like to be able to work on the site using SSH and SFTP, using Terminal on a Mac.

The problem is that when I SSH/SFTP to the server, the address above becomes:

/le?on 1 - identification & vocabulaire.html

The ç becomes a ?.

So, for example, when I want to SFTP a file to:

le?on 4 - origine, terminaison & action

I cannot figure out how to CD to the directory I want -- I can't type the ç character in a way that the server will recognize. The asterisk wildcard helps sometimes but not always.

Is there a way to use SSH/SFTP using UTF-8 characters?

[update] Here is the output of locale (my local computer which displays the accents correctly):


The Apache server doesn't recognize lang or locale.

share|improve this question
What is your locale set to? Can you post the output of locale? – James O'Gorman Jan 10 '12 at 9:34
To use utf8 characters in your shell, you can try exporting the variable: LANG. Have a look at this page: – Khaled Jan 10 '12 at 9:55
The output above is from my local computer (which displays the accents correctly). When I SSH to the server (Apache), lang and locale don't exist. – Andrew Swift Jan 10 '12 at 10:14
How about echo $LANG on the remote server? – James O'Gorman Jan 10 '12 at 19:05
echo $LANG returns C. Not sure what that means. I tried looking around in the httpd.conf, but didn't see anything locale-related. – Andrew Swift Jan 11 '12 at 10:38

Instead of trying to get "sftp" to do the right thing (a lost cause in many cases) I have found that using "sshfs" to mount the remote location locally makes it so much easier to work with remote files. As an added bonus you get to keep your shell's tab completion, and you can even edit remote files without having to copy them back and forth.

You did say that your local machine recognizes the names fine, so I guess sshfs will do the trick.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.