MandrivaUsers.org : Samba: special characters in filenames disappear - MandrivaUsers.org

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Samba: special characters in filenames disappear Show special chars in Win & Mac browsers

#1 User is offline   tlahtopil 

  • New Here
  • Group: Members
  • Posts: 11
  • Joined: 08-June 05

Posted 10 March 2006 - 11:54 PM

As an Spanish-speaking user, every time I have to install Samba I find that my accented vowels and '' dissapear when browsing smb-servers in Windoze Explorer or Crapintosh Finder, same as I've read happens to German-speaking users with umlauts ans ess-tset. So, if you use a Latin-based alphabet, here's my recipe:

1. Set your global environment encoding to ISO8859-1 (I use Konqueror > Preferences > Configure > Fonts; notice this may not work with other environs, text or graphic, but KDE is the one and almost only for me).
2. Find and edit (maybe as root) smb.conf; don't ask me where it lives, I'm an almost-newbie, so perform a local search and edit it with the tool you feel most comfortable; I suggest Swat or Webmin, better the former.
3. Write these values in "[global]" (literaly; copy-paste this if you want):

[global]
dos charset = CP850
unix charset = iso8859-1
display charset = LOCALE

In Swat, go to Globals > Advanced, type those values and click on "Commit".

4. Save smb.conf and restart Samba.

I don't assure it will work for you, I don't even know if it works the same in all Samba versions, but there is where I head to every time I have to setup a new Samba server. As far I've read in forums, the main thing is to first tie your environment to a concrete encoding, so don't ever let that line blank or as "environment default", "local language default", etc.

For Latin based alphabets, always try first ISO8859-1 in your environment and "Unix charset", if that doesn't work, try ISO8859-15, and if that either, ISO8859-13. Last resorces are ASCII and CP-850 (this may be needed if you have a disk with very old DOS partitions or old-DOS-long-filenames, but your Ext-2/3 partitions may then suffer).

If you're working on a multiboot PC with preexisting Windoze partitions, don't install your *n*x with "Unicode as default", 'cause that will mess all their special-char-filenames (well, they remain ASCII or CP850 correct, but *n*x won't translate them well, and if you retype them, then WExplorer will also scramble the Unicode chars).

As far as I've experienced, the holy grial of correct encode-mangling is to first install *n*x on a fresh new PC with "Unicode as default", later install Windoze (NT family is less-worse) and also pick Unicode as default, and then, afer a good reboot, begin creating special-char filenames. Removable FAT, FAT32 and NTFS media should be expected to have ISO8859-15 encoding, which you can configure in Drakconf.


Good luck.

This post has been edited by tlahtopil: 19 January 2007 - 04:27 PM

0

#2 User is offline   spinynorman 

  • Not a Mandriva Guru
  • Group: Admin
  • Posts: 4,221
  • Joined: 04-June 03

Posted 11 March 2006 - 12:34 AM

Thanks, tlahtopil. I'll move this to Tips & Tricks. :)/>
Posted Image Track Bugs at Bugzilla Posted Image
ASUS Terminator P4 1.7 GHz; 256MB DDR RAM; 40GB; 7200 rpm U-DMA ATA-100 IDE HD; Hansol H530 TFT monitor; 16x48 DVD; 40x12x48 CD-RW; Netgear DG834G; Epson Stylus C62; Mandriva 2008.1
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users