mount.cifs ignores iocharset even specified

Bug #257411 reported by Pmn
4
Affects Status Importance Assigned to Milestone
cifs-utils (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: smbfs

In short: mount.cifs command's option iocharset does have not any effect on how the filenames in mounted directory are shown.

Somewhat detailed version:
I have a Samba (version 2.2.8a-ja-1.1) serving files for the computers on the network. It is used by Fedora and Windows machines. Now the Fedora computers are being replaced by Ubuntu computers. So far the migration has gone pretty good.

Now the new Ubuntu machine needs to mount previously mentioned Samba server's share (//file/share) as /pub/documents. And I have tried mount it with:
# /sbin/mount.cifs //file/share /pub/documents -o iocharset=iso8859-1

I can access the files and everything seems to be alright. There are files on Samba server with umlaut and other iso8859-1 encoded characters in their filenames. These files are shown as their "special characters" replaced with question marks.

For example:
file "Työpäivä.txt" is shown as "Ty?p?iv?.txt".

Now I have tried several combinations with mount.cifs .... -o iocharset=utf8 and ... -o iocharset=cp850 and list goes on and on. There is not simply any effect on it how filenames with umlaut characters are shown. Always the question marks... argh.

Some notes:
- Filenames are shown correctly with konqueror browsing Samba share directly (smb://file/share)
- "smbclient //file/share" shows filenames correctly
- Windows XP and the soon-to-be-replaced Fedora (with smbfs) machines do show filenames correctly
- "mount -t cifs -o iocharset=..." has same effect as "mount.cifs -o iocharset=..."

Info about system and package:
Description: Ubuntu 8.04.1
Release: 8.04
smbfs version 3.0.28a-1ubuntu4

Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this issue and help to improve Ubuntu.

According to the mount.cifs(8) manpage, the 'iocharset' option is only used when the server supports Unicode. The references I've found on the Internet confirm my distant memory that Samba 2.2 did not support Unicode on the wire, which means that the kernel cifs driver will not translate these filenames for you.

I'm marking this bug as 'triaged', but I'm afraid it's unlikely to receive attention, since only very old servers (Win9x, and Samba 2.2 or earlier) don't support Unicode on the wire and a considerable amount of additional code would be required to handle charset translations in the non-Unicode case.

FWIW, the next release of Fedora will have the same problem, since the old smbfs kernel driver has been deprecated across the board; so I regretfully suggest that you upgrade your Samba server.

Changed in samba:
importance: Undecided → Low
status: New → Triaged
Jelmer Vernooij (jelmer)
affects: samba (Ubuntu) → cifs-utils (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.