Super User is a question and answer site for computer enthusiasts and power users. 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

in old times of smbfs I use codepage and iocharset options, but cifs does not support codepage. What I can do?

share|improve this question
You can upgrade the server to support Unicode. – grawity Nov 2 '10 at 14:11
Comments for the bounty: I have essentially the same problem, in windows the file names show as expected, but in linux they show with a lot of weird characters. I tried various iocharset settings, to no avail. I don't control the server. – Peltier Jun 17 '11 at 8:24
@harrymc: I'm using a rather old version of linux: Ubuntu Hardy Heron. Is there a way I can find out what OS the server is running? The windows client that works is an XP virtual machine running on the linux box. – Peltier Jun 19 '11 at 19:04
@harrymc: smbclient -L fails with the following error:session setup failed: NT_STATUS_LOGON_FAILURE – Peltier Jun 20 '11 at 9:17
This maybe me being thick, but if mounting with SMBFS used to work, and CIFS does not work, then why not just keep using SMBFS? – Kirk Jun 22 '11 at 3:45

I suppose your problem is with the file-names showing up with funny characters for an NTFS share.

According to the NTFS FAQ, the mount command supports the iocharset parameter for NTFS. You should pay particular attention to section 4 and try the mount commands given there.

In another article : smbfs & cifs; accentuated characters; solved, the author proposes three possibilities for mounting such shares :

mount // /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8
mount // /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8,codepage=cp437
mount // /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8,codepage=cp850

For more info, the above article describes the author's consecutive tries and logic, until he got this working for him.

share|improve this answer
@Peltier: Please also mark this as the answer. I have deleted all my useless comments above. You should maybe do the same. – harrymc Jun 23 '11 at 15:58

Just to mention, make sure it's not a ssh setting that is badly set.

Just spent a whole night trying to figure out how to solve this. Mounting a Window 8.1 NTFS folder with french character (é,è) was causing my ls to display :

  • N° 093 - Déepense.xls
    instead of
  • N° 093 - Dépense.xls

    Turn out problem was that Putty default Window->Translation->Remote character set was set to ISO-8859-1. Once I changed it to UTF-8 everything displayed correctly.

    Just keep it in mind if you always remote in like I do. Take 5 sec to test it out on a local shell before you spend an enjoyable evening reading and digging thru the microsoft NTFS code page tech documentation to try to figure out what your local Windows NTFS partition code page is set to so you can set the correct code page in the iocharset cifs argument :)

  • share|improve this answer

    You must log in to answer this question.