[samba] Fw: Re: Samba fc3: accent problem - smbfs vs cifs

Alexander Bokovoy ab на altlinux.org
Вт Ноя 30 07:48:36 MSK 2004


----- Forwarded message from Steven French <sfrench на us.ibm.com> -----

Date: Mon, 29 Nov 2004 19:23:57 -0600
From: Steven French <sfrench на us.ibm.com>
To: linux-cifs-client на lists.samba.org, samba-technical на lists.samba.org
Cc: 
Subject: Re: Samba fc3: accent problem - smbfs vs cifs

> I found a solution to display the non-english 
> characters (?, ?, ? ...?) 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 
> accent display properly and in others it does not. 
> Kind of weird... Here are the test results:
>
>***** if /etc/fstab contains
> //192.168.0.4/bg /mnt/serveur    cifs
> user,rw,uid=bgirin,credentials=/etc/samba/pwd_bg   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=bgirin,credentials=/etc/samba/pwd_bg,codepage=cp850   0 0
>
>->the accent display properly
>
>BUT if /etc/fstab contains
>//192.168.0.4/bg   /mnt/serveur   smbfs
>user,rw,uid=bgirin,credentials=/etc/samba/pwd_bg,codepage=cp850 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 
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 
target of the unicode filename conversions) on the mount parm (similar to
what 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. 

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

----- End forwarded message -----

-- 
/ Alexander Bokovoy
Samba Team                      http://www.samba.org/
ALT Linux Team                  http://www.altlinux.org/
Midgard Project Ry              http://www.midgard-project.org/
----------- следущая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : отсутствует
Тип     : application/pgp-signature
Размер  : 189 байтов
Описание: отсутствует
Url     : http://lists.altlinux.ru/pipermail/samba/attachments/20041130/6818a3f6/attachment-0001.bin


Подробная информация о списке рассылки Samba