[Samba] Re: unicode/control characters displaying as ? with cifsfs (SOLVED)

henry j. mason hmason at dbsinet.com
Tue Nov 1 17:02:51 GMT 2005


henry j. mason wrote:
>     greeting samba.general;
> 
>     i am trying to set up a backup server to archive files from
>     a windows 2000 fileserver, and i can't seem to get filenames
>     containing non-ascii characters to appear correctly on the
>     linux box.

	after some more digging on the web, i found that i need to
	generate a UTF-8 character set encoding. by default, debian
	only comes with a bare minumum, and the default charset
	happens to be en_US.iso88591 - which doesn't match the UTF-8
	encoding used by windows. so, to do this under debian (as root):

mpi-images:~# dpkg-reconfigure locales

	scroll down until you see the UTF-8 encoding for your locale,
	in this case, en_US.UTF-8. select the encoding, and choose
	'Ok'. debian will generate the locales for you. check their
	existence with:

mpi-images:~# locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8

	then, the magic mount command is:
mpi-images:~# mount -t cifs //YCS1610-767/Jobs /mnt/prinergy/jobs/ -o username=imageserver,password=xxx,iocharset=utf8

	now, when i list that same directory:
admin at mpi-images:~$ ls -l "/mnt/prinergy/jobs/ System 5 Bearer Bars/"
total 592
-rwxrwSrwt  1 root root 537856 2004-01-05 10:24 57686e_f.srd
-rwxrwSrwt  1 root root      0 2003-06-19 13:14 Icon♪
-rwxrwSrwt  1 root root  32455 2003-07-09 14:05 System 5 bottom bearer.ai6
-rwxrwSrwt  1 root root  32242 2003-07-09 14:06 System 5 top bearer.ai6

	the stupid control character shows up correctly as whatever
	it is. and the copy command executes happily:

admin at mpi-images:~$ cp "/mnt/prinergy/jobs/ System 5 Bearer Bars/Icon♪" /tmp/
admin at mpi-images:~$

	voila!
	hope this helps someone else :)

	regards,
	henry



More information about the samba mailing list