my-server
← Wiki

Portable character set

Portable Character Set is a set of 103 characters which, according to the POSIX standard, must be present in any character set. Compared to ASCII, the Portable Character Set lacks some control characters, and does not prescribe any particular value encoding. The Portable Character Set is a superset of the Basic Execution Character Set as defined by ANSI C.

Character Classes

Characters grouped by their class.

Portable filename character set

POSIX also standardizes a portable filename character set, a much smaller subset of 65 of the above characters: 26 uppercase letters, 26 lowercase letters, 10 decimal digits, and three punctuation characters "period", "underscore", and "hyphen".

To be usable across all POSIX locales, a pathname should consist only of characters from that portable filename character set, "slash" characters, and a single final "NUL" character. Like the Portable Character Set that these characters are taken from, the encoding of the portable filename character set is not specified.

To be usable across all POSIX locales, user names, group names, file names, and directory names should be composed only from characters from the portable filename character set. The "hyphen" should not be used as the first character of any of those names.

Many people recommend using only this portable filename character set for file names and directory names, even on systems that technically could use other letters and symbols; perhaps by using utilities such as detox, convmv, and Glindra to fix "bad" filenames.

References