Filename mangling

Filename mangling

dablink|This article discusses the mangling of filenames for operating system compatibility.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 networks 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.

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 a Windows machine to access it.

* 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 12 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 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).


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Name mangling — This article is about name mangling in computer languages. For name mangling in file systems, see filename mangling. In compiler construction, name mangling (also called name decoration) is a technique used to solve various problems caused by the …   Wikipedia

  • Tilde — For the baseball player known as the Big Tilde, see Magglio Ordóñez.  ◌̃ Tilde Punctuation …   Wikipedia

  • C++ — The C++ Programming Language, written by its architect, is the seminal book on the language. Paradigm(s) Multi paradigm:[1] procedural …   Wikipedia

  • COM file — This article is about the .COM file format. For the top level Internet domain, see .com. COM Filename extension .COM Type of format Executable In many computer operating systems, a COM file is a type of executable file; the name is derived from… …   Wikipedia

  • Portable Executable — Not to be confused with Portable application. Portable Executable Filename extension .cpl, .exe, .dll, .ocx, .sys, .scr, .drv Developed by Microsoft Type of format Binary, executable, object, shared libraries …   Wikipedia

  • Executable — This article is about a general type of computer file. For the specific file type used in some operating systems, see EXE. A hex dump of an executable real mode boot loader In computing, an executable file causes a computer to perform indicated… …   Wikipedia

  • COFF — Filename extension none, .o Developed by AT T Type of format Binary, executable, object, shared libraries Extended to XCOFF, ECOFF, Portable Executable The Common …   Wikipedia

  • DCOP — For the use of this acronym as it pertains to Artificial Intelligence, see Distributed constraint optimization. DCOP, which stands for Desktop COmmunication Protocol, is a light weight interprocess and software componentry communication system.… …   Wikipedia

  • New Executable — Filename extension .exe, .dll Type of format Executable, dynamic link library Extended from DOS MZ executable The New Executable (abbreviated NE or NewEXE) is a 16 bit .exe file format, a successor to the …   Wikipedia

  • DOS MZ executable — Filename extension .exe Magic number MZ Type of format Binary, executable Extended to New Executable Linear Executable Portable Executable The DOS MZ executable f …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”