![]() |
![]() |
e-docs > Tuxedo > ATMI C Function Reference > Section 3c - C Functions |
ATMI C Function Reference
|
Name
tpgetmbenc()—Gets the code-set encoding name from a typed buffer.
Synopsis
#include <atmi.h>
extern int tperrno;
int
tpgetmbenc (char *bufp, char *enc_name, long flags)
Description
This function is used to get the codeset encoding name sent with a typed buffer. This name can be compared to a target codeset if a conversion is required (see tpconvmb(3c)).
The bufp argument is a valid pointer to a typed buffer message.
The enc_name argument will be set to the encoding name, found in bufp, upon successful execution of this function. The returned string will be NULL terminated. The user must take care to allocate a buffer large enough to hold the encoding name plus the NULL terminator (see NL_LANGMAX in <limits.h>). An MBSTRING typed buffer without the encoding name set is invalid.
The flags argument is not currently used and should be set to zero.
Return Values
Upon success, tpgetmbenc() returns a value of 0. This function returns -1 on error and sets tperrno as described below for each function. The function may fail for the following reasons.
See Also
tpalloc(3c), tpconvmb(3c), tpsetmbenc(3c)
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |