Common Desktop Environment: Internationalization Programmer's Guide

Compound Strings in UIL

Three mechanisms exist for specifying strings in UIL files:

Both string literals and compound strings consist of text, a character set, and a writing direction. For string literals and for compound strings with no explicit direction, UIL infers the writing direction from the character set. The UIL concatenation operator (&) concatenates both string literals and compound strings.

Regardless of whether UIL stores string literals in UID files as null-terminated strings or as compound strings, it stores information about each string's character set and writing direction along with the text. In general, UIL stores string literals or string expressions as compound strings in UID files under the following conditions:

UIL recognizes a number of keywords specifying character sets. UIL associates parsing rules, including parsing direction and whether characters have 8 or 16 bits, for each character set it recognizes. It is also possible to define a character set using the UIL CHARACTER_SETfunction.

The syntax of a string literal is one of the following:

For each syntax, the character set of the string is determined as follows:

UIL always stores a string specified using the COMPOUND_STRING function as a compound string. This function takes as arguments a string expression and optional specifications of a character set, direction, and whether to append a separator to the string. If no character set or direction is specified, UIL derives it from the string expression, as described in the preceding section.


Note -

Certain predefined escape sequences, beginning with a \ (backslash), may be displayed in string literals, with the following exceptions: