vfs_catia — translate illegal characters in Catia filenames
vfs objects = catia
This VFS module is part of the samba(7) suite.
The Catia CAD package commonly creates filenames that
use characters that are illegal in CIFS filenames. The
vfs_catia
VFS module implements a character
mapping so that these files can be shared with CIFS clients.
This module is stackable.
Up to samba version 3.4.x a fixed character mapping was used. The invalid windows characters \ / : * ? " < > | and the blank character were mapped in a hardcoded way.
Starting with samba-3.5.0 a more flexible mapping was introduced. The new parameter "catia:mappings" now specifies the mapping on a char by char basis using the notation: unix hex char 0x.. : windows hex char 0x.. Multiple character mappings are separated by a comma.
Samba versions up to 3.4.x:
Map Catia filenames on the [CAD] share:
[CAD]
path = /data/cad
vfs objects = catia
Samba versions 3.5.0 and later:
Map Catia filenames on the [CAD] share:
[CAD]
path = /data/cad
vfs objects = catia
catia:mappings = 0x22:0xa8
To get the full formerly fixed mappings:
[CAD]
path = /data/cad
vfs objects = catia
catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6,0x20:0xb1
Unix filename to be translated (Note that the path delimiter "/" is not used here):
a\a:a*a?a"a<a>a|a a
Resulting windows filename:
aÿa÷a¤a¿a¨a«a»a¦a±a
Note that the character mapping must work in BOTH directions (unix -> windows and windows -> unix) to get unique and existing file names!
A NOT working example:
[CAD]
path = /data/cad
vfs objects = catia
catia:mappings = 0x3a:0x5f
Here the colon ":" is mapped to the underscore "_".
Assuming a unix filename "a:should_work", which is well translated to windows as "a_should_work".
BUT the reverse mapping from windows "a_should_work" to unix will result in "a:should:work" - something like "file not found" will be returned.