Guardian Procedure Calls Reference Manual

HP Chinese Big 510
HP Chinese PC11
HP KSC560112
charinfo
input, output
INT .EXT:1
on input, charinfo specifies the number of bytes, beginning with testmbcschar, that may
be read by the MBCS_CHAR_ procedure. If charinfo is equal to or greater than the size of
a single multibyte character of the MBCS identified by charset, the MBCS_CHAR_ procedure
tests for the presence of a multibyte character. If the integer value supplied in charinfo is
less than the size of a single multibyte character of the MBCS identified by charset, no test
is made and FALSE with no error indication is returned. When omitted, it is assumed that at
least enough bytes can be read to compose a single multibyte character of the MBCS identified
by charset. There is no null value for this parameter.
If charinfo is returned on output, it provides this information:
when result is nonzero:
contains the display size (in columns) of the multibyte character identified by the test.<0:7>
contains the internal size (in bytes) of the multibyte character identified by the test.<8:15>
when result is zero, charinfo contains one of these values indicating the cause of failure
of the MBCS_CHAR_ test:
No reported error; tested character is a one-byte character.0
Required parameter missing.29
An unknown character set was specified.–2
Returned Value
INT
Result of the MBCS character test:
charsetis not a supported MBCS (see charinfo parameter), or charset is a supported MBCS and
testmbcschar does not point to the first byte of a valid character of one of the MBCS character sets listed
under charset.
0
The character set is a supported MBCS, and testmbcschar points to the first byte of a valid character of
charset MBCS. For two-byte character sets, the returned value is the integer value of the sixteen bits which
nonzero
form the multibyte character, using byte-1 as the high order byte and byte-2 as the low order byte of the pair.
All currently supported MBCSs are two-byte character sets.
Considerations
Tests are provided for HP Kanji (Shift-JIS), HP Hangul, HP Chinese Big 5, HP Chinese PC and
HP Korean KSC5601 format MBCS. HP Kanji is the standard internal representation used by
HP for the character set defined in the JIS X0208 standard (formerly JIS C6226). Chinese Big
5 is a character set defined by vendors in Taiwan. Chinese PC is the character set used by
IBM on Chinese PCs. HP Hangul support is provided for the Korean character set in use by
KIPS on HP 6526 terminals as well as for the new standard Hangul (KSC 5601) character
set. All MBCSs are similar in format and are suitable for internal representation of the multibyte
character set in conjunction with an ASCII-like one-byte character set.
In most supported MBCS schemes, single-byte values have multiple- character identities. For
example, in the HP Kanji MBCS format, all ASCII alphabetic and all one-byte Japanese
MBCS_CHAR_ Procedure 787