Guideline F: Coded character sets


F7: Redefining graphic character meaning



Redefining graphic character meaning

Software products sometimes use specific graphic characters to trigger particular actions. This is done to save keystrokes, to aid the parsing process, to initiate function, and for many other reasons. Unfortunately, the use of a graphic character for this purpose may conflict with that character's conventional usage in other regions. Conventional usage then requires a special procedure, which may be very awkward.

Any character that has a special meaning associated by your product must be allowed to transfer this meaning to another character. The original special character should then be usable in a manner normal to the language or culture.


Guideline F7


Allow the user to redefine any graphic character used for application control purposes (such as a delimiter) to permit the use of the character in MRI.

Example: An editor accepts the following command to change a string:

CHANGE /old string/new string/

The editor must recognize delimiter characters other than the slash '/' character if either of the strings contain that character. A solution is to have the CHANGE command use the first nonblank character as the delimiter:

CHANGE ?old string?new string? CHANGE xold stringxnew stringx

Example: A product uses the single quotation mark ' as a message delimiter. One of the messages is:

'The C01 address does not exist.'

After translation to French, the message appears as:

'L'adresse C01 n'existe pas.'

The difference between the single quotation mark ' and the apostrophe ' is not usually observed in data processing environments, causing your product to fail.

A solution is to use two successive apostrophes within the message to mean apostrophe:

'L''adresse C01 n''existe pas.'

In languages where the apostrophe occurs frequently, the above technique is awkward and inconvenient.

A better approach is to permit the redefinition of the delimiter to another graphic character such as the double quotation mark " or the slash / character:
"L'adresse C01 n'existe pas." /L'adresse C01 n'existe pas./

Example: Your product asked the user to enter a series of numbers separated by commas or blanks. You found out later your product is not usable in France because the French radix character is also a comma. For example, the user enters in the following two numbers:

12,34 567

Your product mistakenly parses the input into three numbers:

12 34 567