Guideline G: Introducing Asian ideographic

G1: MBCS and SBCS coexistence

Allowing coexistence of MBCS and SBCS data

From the user's viewpoint, MBCS support means that the product allows the use of single-byte and non-single-byte characters to store data such as names, addresses, and telephone numbers, and the necessary user interface and functions to support MBCS data.

Guideline G1

Allow MBCS data to coexist with SBCS data during the input, processing, and output phases.

Coexistence means that your product will treat every character equally regardless of how many bytes the character requires.

More guidelines that follow will help developers in dealing with MBCS data streams. Although the guidelines given are platform neutral, the way to implement them will be platform specific because of the way that MBCS data is encoded differently on different platforms and in different countries.

To be fully globalized, your product must support MBCS data streams in a seamless manner.

Guideline G1-1

Support MBCS data the same way as SBCS data in a seamless manner.

MBCS enabling does not require any knowledge of what the characters mean, nor of their grammatical usage.

Example:The SQL statement in the DB2 Command Line Processor window below allows both SBCS and DBCS characters to be inserted into the DB2 table.

Guideline G1-2

Use multibyte characters only when required for names, addresses, and descriptions. Use single-byte characters for numbers, yes and no responses from the command line and application control data such as computer user ID and date.

Multibyte characters require additional resource to input, process, and output than pure single-byte characters. Where possible, use single-byte characters to encode data. When MBCS data contains numbers encoded in both SBCS and DBCS code positions, then use the SBCS code positions. A Yes and No response is usually employed to control logic flow. In command line interface, the yes and no response can remain in SBCS English. There is no need to support MBCS responses.

Example:The IBM Lotus Notes Address Book function below illustrates the use of both SBCS and MBCS characters in the same application.