NLTRANSLATE(3X)
NAME
nltranslate − translate ASCII strings to EBCDIC using the MPE conversion table
SYNOPSIS
void nltranslate(code, instr, outstr, length, langid, err, table)
short code, length, langid;
char *instr, *outstr, *table;
unsigned short err[2];
DESCRIPTION
Nltranslate translates a string of bytes from EBCDIC to ASCII or ASCII to EBCDIC, using the appropriate native language table.
The arguments to nltranslate are used as follows:
code 1 - Specifies EBCDIC to ASCII conversion.
2 - Specifies ASCII to EBCDIC conversion.
instr The byte buffer to be translated.
outstr A byte buffer to which is returned the translated string. The parameters instr and outstr can specify the same array.
length A short integer specifying the number of bytes of instr to be translated.
langid A short integer containing the ID number of the language whose translation tables are to be used.
err The first element of this array contains the error number. The second element is always zero. If the call is successful, both elements contain zero.
Error # Meaning
2 Specified language is not configured.
3 Invalid code specified.
4 Invalid length parameter.
table A 256-byte array that holds a translation table. Each byte contains the translation of the byte whose value is its index. This table is provided by the user.
WARNINGS
This routine is provided for compatibility with MPE, another HP operating system. See portnls(5) for more information on the use of this routine. Use the Native Language Support routines for C programmers described on hpnls(5) for HP-UX NLS support.
AUTHOR
Nltranslate was developed by HP.
SEE ALSO
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989