93.12 Filenames

In Windows, the character set used in the Window Manager and GDI (ANSI) is different from the character set used by the file system. The MS-DOS FAT file system uses one of the PC code pages as its character set, called the OEM character set in Windows.

The Windows 32-bit API can be hosted on top of a variety of file systems, some of which, for example NTFS, are capable of storing filenames in Unicode.

If you use Unicode versions of the file system functions, there is no need to perform translations to and from ANSI to OEM character sets around these functions. An easy solution is to provide a NO-OP macro for AnsiToOEM and OEMtoAnsi functions whenever you compile for Unicode.

The special filename characters are the same in Unicode filenames: '\\,' '/,' '.,' '?,' '*.' All these characters are in the ASCII range of characters (0x00 to 0x7f) and their Unicode equivalents are simply zero extensions: 0x0000 to 0x007f.