5

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

11
  • You can upgrade the server to support Unicode. Nov 2, 2010 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, 2011 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, 2011 at 19:04
  • @harrymc: smbclient -L fails with the following error:session setup failed: NT_STATUS_LOGON_FAILURE
    – Peltier
    Jun 20, 2011 at 9:17
  • 1
    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, 2011 at 3:45

2 Answers 2

5

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 //192.168.15.123/a /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8
mount //192.168.15.123/a /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8,codepage=cp437
mount //192.168.15.123/a /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.

0
1

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 :)

    You must log in to answer this question.