Information About

Filename Mangling




For the concept of name mangling within compilers, see Name Mangling }}

The process of name mangling, in Computing , involves a re-writing of the file name for compatibility at the Operating System level. It occurs when a Filename on a Filesystem appears in a form incompatible with the operating system accessing it. Such name mangling occurs, for example, on Computer Network s when a Windows machine attempts to access a file on a Unix server and that file has a filename which includes characters not valid in Windows.

For example: Unix file names can contain Colon s or Backslash es, whereas Windows interprets such characters in other ways. Accordingly, software could mangle the Unix file "Notes: 11-04-03" as "Notes_ 11-04-03" to enable a Windows machine to access it.

Probably the best-known example of name mangling occurs on subsystem returns the long filename to the program — however, if an old DOS application or an old Windows application tries to address the file, it may work at a lower level and perform its own disk access, which results in the return of an 8.3 filename. In this case, the filenames become mangled by taking the first six non-space characters in the filename and adding a Tilde (~) and then a number to ensure the uniqueness of the 8.3 filename on the disk. Thus this mangling scheme can turn (for example) "Program Files" into "PROGRA~1".

Other systems, such as Samba on Unix, use different mangling systems to map long filenames to DOS-compatible filenames (although Samba administrators can configure this behavior in the config file).