nltranslate(3X)
NAME
nltranslate() − translate ASCII strings to EBCDIC using MPE conversion table
SYNOPSIS
#include <portnls.h>
void nltranslate(
short int code,
const char *instr,
char *outstr,
short int length,
short int langid,
unsigned short int err[2],
const char *table
);
DESCRIPTION
nltranslate() translates a string of bytes from EBCDIC to ASCII or ASCII to EBCDIC, using the appropriate native language table.
Arguments to nltranslate() are used as follows:
code Specifies type of conversion:
Value Meaning
1 Convert EBCDIC to ASCII.
2 Convert ASCII to EBCDIC.
instr Byte buffer containing the input string to be translated.
outstr Byte buffer where the translated string is to be returned. 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, a proprietary 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 by 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 10.20: July 1996