Originally published March 1, 2017 @ 1:16 am

This is probably old news to most of you, but I just found out: Samba v 3.5+ has a new option for flexible mapping of filename characters. Unix filenames allow certain characters that Windows filename cannot have. Things like colon, single quote, question mark and some others.

The following options can be added to your smb.conf to enable this feature:

vfs objects = catia
catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6

This would turn a Unix “Is this a Joke?.txt” into “Is this a Joke¿.txt” on Windows, etc. Filename integrity would be preserved on Unix and accessible From Windows. In older versions of Samba, the “weird” filename would have appeared as “ITHSJO~1” or something like that to the Windows users.

I wish this was an option when I used to support Catia as the file-naming convention differences used to be endless source of entertainment.