Guardian Programmer's Guide

Table Of Contents
Formatting and Manipulating Character Data
Guardian Programmer’s Guide 421922-014
19 - 49
Programming With Multibyte Character Sets
!------------------------------------------------------------
! Main procedure performs initialization
!------------------------------------------------------------
PROC SORTER MAIN;
BEGIN
STRING .TERM^NAME[0:MAXFLEN - 1];
INT TERMLEN;
! Read the Startup message:
CALL INITIALIZER;
! Open the home terminal:
ERROR := PROCESS_GETINFO_(!process^handle!,
!file^name:maxlen!,
!file^name^len!,
!priority!,
!moms^processhandle!,
TERM^NAME:MAXFLEN,
TERMLEN);
IF ERROR <> 0 THEN CALL PROCESS_STOP_;
ERROR := FILE_OPEN_(TERM^NAME:TERMLEN,TERM^NUM);
IF ERROR <> 0 THEN CALL PROCESS_STOP_;
! Call the SORTING procedure to initialize the sort array:
CALL SORTING;
END;
Programming With Multibyte Character Sets
The operating system provides support for national languages whose character set
cannot be represented by a single-byte character set such as ASCII code. To support
languages with larger character sets, such as Japanese, Korean, and Chinese, HP
provides multibyte character sets.
Specifically, HP provides internal representations of the following character sets for use
with terminals that support multibyte character sets:
Tandem Kanji
Tandem Hangul
Tandem Chinese Big 5
Tandem Chinese PC
Tandem KSC5601
The operating system supports text strings that can contain codes from one of the
above character sets and standard ASCII codes within the same string.