nlrepchar(3X)
NAME
nlrepchar() − replace non-displayable characters of a string using the MPE character set table
SYNOPSIS
#include <portnls.h>
void nlrepchar(
const char *instr,
char *outstr,
short int length,
char repchar,
short int langid,
unsigned short int err[2],
const char *charset
);
DESCRIPTION
nlrepchar() replaces all non-displayable characters in the input character buffer with the replacement character. Non-displayable characters are those of types 3 and 5, as returned by nlinfo(3X), itemnumber 12. Native language characters of the supported character set are not replaced.
Arguments to nlrepchar() are used as follows:
instr A character buffer in which the non-displayable characters must be replaced.
outstr A character buffer to which the replaced character string is returned.
length A short integer specifying the length (in bytes) of instr.
repchar A byte specifying the replacement character to be used.
langid A short integer value specifying the language ID number of the language that determines the character set 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 replacement character.
4 Invalid length parameter.
8 The value of outstr would overwrite instr.
10 Invalid Asian character.
charset Contains the character set definition for the language to be used, as returned in nlinfo(3X)’s itemnumber 12. If this parameter is supplied (i.e., not NULL ), langid is ignored and this routine is much more efficient.
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
nlrepchar() 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