Page 1 of 1

International chars in filenames when using samba

Posted: 01 Mar 2007, 05:39
by juicer
When using the default samba config, international characters, e.g. åäö, appear as garbage when you copy files to your samba-mounted bubba from windows and then access them with SSH/SCP. To avoid this, use the following small modification to /etc/samba/smb.conf:

Under [global] section add:

unix charset = ISO-8859-1
dos charset = UTF8

The last line enables international chars if you are using e.g. smbclient to access your windows shares from bubba. You will need to restart samba for the change to take effect:

/etc/init.d/samba restart

Posted: 01 Mar 2007, 11:24
by TheEagleCD
Thanks for the information.

I just added those two lines to the smb.conf and restarted the service.

However I'm still encountering an odd issue:

While my "aäüö.txt" file now displays correctly in the Windows explorer I'm still looking at "a??????.txt" when I use SSH. Anyone got an idea on how address that?

Thanks,
Christoph

Posted: 01 Mar 2007, 12:12
by juicer
You need to set the correct locale for the shell. Install the 'localeconf' package to add the locales you want.

> apt-get update
> apt-get install localeconf

After install, you will be prompted to select which locales that should be available. E.g.:

POSIX
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
sv_SE
sv_SE.iso88591
sv_SE.iso885915
sv_SE.utf8
swedish

Then you decide which one should be the default. I use 'en_US' which works fine. See also 'man locale'.

Posted: 01 Mar 2007, 13:57
by TheEagleCD
Thanks for your help!

"de_AT ISO-8859-1" is the one that ended up working for me. Even though it took me awhile to figure out that I had to re-start the system for the change to take effect. I'm sure there's also a way to simply re-start bash itself but I've got absolutely no clue how to do that. :oops:

Cheers,
Christoph