HP 9000 User Manual page 136

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

Once you determine the size of the conversion table
(if
it is required and
exists), you must provide the necessary initialization. Use iconvopen to
provide all initializations necessary for converting characters from the codeset
specified by fromcode to the codeset specified by tocode. The initialization
process includes:
• The retrieval of the necessary table.
(It
is your responsibility to allocate
sufficient memory for the table based on the value returned by iconvsize) .
• The global initialization of default values for unmappable characters within
multi-byte codesets. Default characters are used with multi-byte characters
since multi-byte codesets usually do not have the same number of characters;
this makes a one-to-one mapping difficult. No default values are used with
single-byte codesets.
The syntax of the routine is as follows:
iconvd iconvopen (tocode, fromcode, table, d1, d2)
char *tocode;
char *fromcode;
unsigned char *table;
int d1, d2;
Where:
tocode
fromcode
table
dl
d2
iconvd
Identifies the target codeset.
Identifies the source codeset.
Points to the start of the conversion table if needed, otherwise
points to null.
Specifies a default character for a unmappable one-byte
character (within a multi-byte codeset).
Specifies a default character for an unmappable two-byte
character.
Acts as a conversion descriptor and function return value.
Two additional auxiliary routines are provided besides the conversion
routines (which will be explained shortly). These are iconvclose and, the
less frequently required, iconvertlock. iconvclose closes the conversion
descriptor cd, freeing it up for a subsequent iconvopen. A non-negative
Advanced NLS Topics 8-3
8

Advertisement

Table of Contents
loading

Table of Contents