> I found a solution to display the non-english=20
> characters (=E9, =E0, =E8 ...=E0) correctly in the
> filenames on the server. Based on the /etc/samba/smb.conf and
> the /etc/sysconfig/i18n described at the end of this post, I have
> changed the fstab command line. In some case the=20
> accent display properly and in others it does not.=20
> Kind of weird... Here are the test results:
>
>***** if /etc/fstab contains
> //192.168.0.4/bg /mnt/serveur cifs
> user,rw,uid=3Dbgirin,credentials=3D/etc/samba/pwd=5Fbg 0 0
>
> ->the accent display properly. It also works without the user option.
>
>
>***** if /etc/fstab contains
>//192.168.0.4/bg /mnt/serveur smbfs
>rw,uid=3Dbgirin,credentials=3D/etc/samba/pwd=5Fbg,codepage=3Dcp850 0 0
>
>->the accent display properly
>
>BUT if /etc/fstab contains
>//192.168.0.4/bg /mnt/serveur smbfs
>user,rw,uid=3Dbgirin,credentials=3D/etc/samba/pwd=5Fbg,codepage=3Dcp850 0 0
>
>-> it does not work anymore. In that case Nautilus finds that any
>filename containing accent is unicode invalid.


That is interesting data. I would expect cifs vfs to work as long
as:
1) the server supports Unicode on the wire (Samba 3 and later can=20
support Unicode, as does Windows)
2) the client codepage at mount time (nls charset) - in this case whatever
code page is the default for the process is automounting these entries
needs to be able to handle these entries and it probably should match
the default code page that nautilus was launched under. cifs vfs
also allows overriding the iocharset (the local nls charset used as the=20
target
of the unicode filename conversions) on the mount parm (similar to what=20
smbfs did).
There is no need to specify code page.

All that cifs cares about is basically Unicode->nls charset and vice versa
conversions - and the nls charset is taken from what is active when the
mount occurred. Most earlier versions of smbfs did not support Unicode
so they had big problems with client codepage conversions.=20

There is a bug in the cifs readdir code in unicode translations when the=20
target
(e.g. UTF-8 encoded file name) is longer than it would be in Unicode=20
(which is
not that common, but happens often enough to cause problems for multiple=20
users
who had emailed me). In any case the cifs readdir code is rewritten from=20
scratch
(available in svn on svn.samba.org in the linux-cifs-client project and=20
the
master copy is in bk://cifs.bkbits.net/linux-2.5cifs pending additional=20
testing
before I push it to Linus).

>Note that the when the user option is set-up, gnome automatically
> displays a shortcut to the mounted file on the desktop.


With cifs or with smbfs?




Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com