Examples
- Unix file names can contain colons or backslashes, 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 Windows software to remotely access the file.
- Other Unix-like 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).
- Probably the best-known example of name mangling occurs on VFAT file systems on versions of Windows from Windows 95 onwards. The VFAT specification allows Long File Names (LFNs). For backwards-compatibility with MS-DOS and older Windows software, which recognizes filenames of a maximum of 11 characters in length with 8.3 format (i.e.: an eight-letter filename, a dot and a three-letter extension), files with LFNs get stored on disk in 8.3 format, with the long file name stored elsewhere on the disk. Normally, when using compatible Windows programs which use standard Windows methods of reading the disk, the I/O 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 will use the older, 8.3-only APIs, or 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". This tradition continues today when people use DOSBox to play classic DOS games or use Windows 3.1 in conjunction to play Win16 games on 64-bit Windows.
- Mac OS X replaces instances of ":" in filenames with a "/". This is because prior versions of Mac OS used the ":" character internally as a path separator.
Read more about this topic: Filename Mangling
Famous quotes containing the word examples:
“No rules exist, and examples are simply life-savers answering the appeals of rules making vain attempts to exist.”
—André Breton (18961966)
“In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.”
—Michel de Montaigne (15331592)
“It is hardly to be believed how spiritual reflections when mixed with a little physics can hold peoples attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.”
—G.C. (Georg Christoph)