Page of 234

HP 9000 User Manual Page 157

Hide thumbs


In working with multi-byte data, 16-bit curses is available to facilitate display
design. More information is available in curses(3C) in the HP- UX Reference
and in the section on Curses in the Terminal Control User's Guide.
Guidelines for Processing Multi-byte Data
• Do not search for a single-byte character in multiple-byte data on a
byte-by-byte basis. A given byte may represent either a single-byte character
or part of a multiple-byte character. Either test the data byte-by-byte
while scanning to identify the multiple-byte characters, or convert the data
to a form where all characters have the same width, or use multiple-byte
character intrinsics. The first two techniques are generally used in C, the
third technique is generally used in other programming languages .
• Do not back-scan, truncate or substitute multiple-byte data byte-by-byte.
This is an extension of the rule above. Backscanning multiple-byte data
is difficult; this should be taken into account when designing algorithms.
Similarly, if a string is truncated be sure that a multiple-byte character is not
split at the end of the truncated string. Extra care must also be taken if
multiple-byte characters are being substituted for single-byte characters, or
Special Topics for HP's 16-bit Interfaces


   Related Manuals for HP 9000

Comments to this Manuals

Symbols: 0
Latest comments: