ATMI C Function Reference
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
tpsetmbenc()
—Sets the code-set encoding name for a typed buffer.
#include <atmi.h>
extern int tperrno;
int
tpsetmbenc(char *bufp, char *enc_name, long flags)
This function is used for setting or resetting the codeset encoding name. The encoding name is sent along with the input typed buffer. A process receiving these message can use tpgetmbenc()
to retrieve this encoding name.
tpsetmbenc()
sets the codeset encoding name to be included with a Tuxedo system request. Once this function sets a non-NULL encoding name in the caller's buffer, all requests sent (via tpcall()
, tpsend()
) include this string until reset or unset. An initial codeset encoding name is applied to a MBSTRING buffer, during tpalloc()
, using the TPMBENC environment variable. An MBSTRING buffer without an encoding name defined is invalid.
The bufp
argument is a valid pointer to a typed buffer with an encoding name.
The enc_name
argument is the encoding name to use to identify the codeset encoding.
The flags
argument is 0 or RM_ENC. For RM_ENC the encoding name will be removed from the MBSTRING buffer and the enc_name
argument will be ignored. Note that an MBSTRING buffer without an encoding name will fail the _tmconvmb() conversion.
Upon success, tpsetmbenc()
returns a 0 value otherwise it returns a non-zero on error and sets tperrno
to indicate the error condition. This function may fail for the following reasons.
tpalloc(3c)
, tpconvmb(3c)
, tpgetmbenc(3c)
, tpservice(3c)
, tuxsetmbenc(3c)
![]() ![]() |
![]() |
![]() |