Samba: missing umlauts in client

Thorny

Developer
Hello,

I have a Samba share, which has the following global char-set definition in smb.conf:
Code:
# Charset settings
display charset = cp1252
unix charset = utf-8
dos charset = cp866

Now I want to mount a share of the server with mount_smbfs. This works, but after mounting, all umlauts are missing in the output. For example:
Code:
#  mount_smbfs -I 192.168.23.225 -E utf-8:cp1252 //thorny@192.168.23.225/home /home/thorny/mount/home/

An ls -lah gives me this result:
Code:
drwxr-xr-x  1 thorny  thorny    16K  1 Jan  1970 .
drwxr-xr-x  9 thorny  thorny   512B  6 Dez 14:05 ..
-rwxr-xr-x  1 thorny  thorny     0B  6 Dez 14:12 t

At the server, I get this result:
Code:
drwxr-xr-x  1 thorny  thorny    16K  1 Jan  1970 .
drwxr-xr-x  9 thorny  thorny   512B  6 Dez 14:05 ..
-rwxr-xr-x  1 thorny  thorny     0B  6 Dez 14:12 täst.txt

My client locales are:
Code:
# locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8

My server locales are:
Code:
# locale 
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=

I tried different charset combinations, but nothing worked. Now I believe that I have a big missunderstanding of the problem. Can anyone give me a hint?

Thanks for your time and help,
Thorny
 
Sorry, i didn't get the point. You say the console is not UTF-8 aware. Okay, but the server and the client are both FreeBSDs. Why could i see all umlauts at the server, but not at the client?
Also: if i mount from another FreeBSD, i get the following output:
Code:
drwxr-xr-x  1 thorny  thorny    16K  1 Jan  1970 .
drwxr-xr-x  9 thorny  thorny   512B  6 Dez 14:05 ..
-rwxr-xr-x  1 thorny  thorny     0B  6 Dez 14:12 t??st.txt

That is far better.

In the linked thread was posted, that it just doesn't work at the console, but all GUI-programms should work correctly. I testet it, but this isn't the case for me.

Any hints?
 
I already have:
Code:
LC_ALL=de_DE.UTF-8

This doesn't work. I can see/use all german umlauts at the client. But i can't see umlauts at the mounted samba-share.

Greetings,
Thorny
 
Yeah, the console does not support UTF-8 properly. Do you have to use the console on the client machine or were you just testing on it? If you use a terminal emulator like Putty the UTF-8 file names should display correctly.
 
I had the same problem (with a Linux or Windows client).

Code:
$ ls /some_nfs_share
testöäüß
$ ls /some_samba_share
test????


Then on the server, I added
Code:
display charset = utf-8
as suggested above, which didn't fix it.

Then I added
Code:
iocharset=utf8
in the mount options on the Linux client (mount.cifs), which seemed to work. However, I don't see that option in the FreeBSD client (mount_smbfs) man page. Maybe this is the same thing, but I don't have a FreeBSD client up right now to test:
Code:
 -E cs1:cs2
        Specifies local (cs1) and server's (cs2) character sets.
 
mix_room said:
Have you tried without the cp1252 extensions? Just running everything over plain utf-8?
Yes. This doesn't work either.

kpa said:
Yeah, the console does not support UTF-8 properly. Do you have to use the console on the client machine or were you just testing on it? If you use a terminal emulator like Putty the UTF-8 file names should display correctly.
As i stated above: this is not a console problem. No GUI could display the umlauts. I also tested it with putty: it does not work :(

@peetaur
My exact problem. I also have a Linux here, which displays the umlauts correctly after defining the iocharset. But i already tried the -E flag in various ways, but nothing works.
 
Problem solved :) At the weekend, i wrote a little script, which tests the various configurations of samba and the mounting-options automatically.

First i must change the dos charset in smb.conf, because the FreeBSD client use this charset and not the unix-charset when mounting.

Code:
# Charset settings
   display charset = cp1252
   unix charset = utf-8
   dos charset = cp1252

My locales are correct:
Code:
# locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8

And now the same mount-command works:
Code:
#  mount_smbfs -I 192.168.23.225 -E utf-8:cp1252 //thorny@192.168.23.225/home /home/thorny/mount/home/

Result for ls -lah:
Code:
drwxr-xr-x  1 thorny  thorny    16K  1 Jan  1970 .
drwxr-xr-x  9 thorny  thorny   512B  6 Dez 14:05 ..
-rwxr-xr-x  1 thorny  thorny     0B  6 Dez 14:12 täst.txt

Thanks for all hints and your time,
Thorny
 
Back
Top