Page:Xlib - C Language X Interface.pdf/11

 '''1.7. Character Sets and Encodings'''

Some of the Xlib functions make reference to specific character sets and character encodings. The following are the most common:
 * XPortable Character Set
 * A basic set of 97 characters, which are assumed to exist in all locales supported by Xlib.
 * This set contains the following characters:


 * a..z A..Z 0..9 !"#$%&'*+,-./:;<=>?@[\]^_`{|}~, , and


 * This set is the left/lower half of the graphic character set of ISO8859-1 plus space, tab, and newline. It is also the set of graphic characters in 7-bit ASCII plus the same three control characters. The actual encoding of these characters on the host is system dependent.


 * Host Portable Character Encoding
 * The encoding of the X Portable Character Set on the host. The encoding itself is not defined by this standard, but the encoding must be the same in all locales supported by Xlib on the host. If a string is said to be in the Host Portable Character Encoding, then it only contains characters from the X Portable Character Set, in the host encoding.


 * Latin-1
 * The coded character set defined by the ISO8859-1 standard.


 * Latin Portable Character Encoding
 * The encoding of the X Portable Character Set using the Latin-1 codepoints plus ASCII control characters. If a string is said to be in the Latin Portable Character Encoding, then it only contains characters from the X Portable Character Set, not all of Latin-1.


 * STRING Encoding
 * Latin-1, plus tab and newline.


 * POSIX Portable Filename Character Set
 * The set of 65 characters, which can be used in naming files on a POSIX-compliant host, that are correctly processed in all locales. The set is:


 * a..z A..Z 0..9 ._-

1.8. Formatting Conventions

Xlib ­ C Language X Interface uses the following conventions:
 * Global symbols are printed in this special font. These can be either function names, symbols defined in include files, or structure names. When declared and defined, function arguments are printed in italics. In the explanatory text that follows, they usually are printed in regular type.
 * Each function is introduced by a general discussion that distinguishes it from other functions. The function declaration itself follows, and each argument is specifically explained. Although ANSI C function prototype syntax is not used, Xlib header files normally declare functions using function prototypes in ANSI C environments. General discussion of the function, if any is required, follows the arguments. Where applicable, the last paragraph of the explanation lists the possible Xlib error codes that the function can generate. For a complete discussion of the Xlib error codes, see section 11.8.2.