__etoa_l() — EBCDIC to ISO8859-1 conversion operation

Standards

Standards / Extensions C or C++ Dependencies
z/OS® UNIX both  

Format

#include <unistd.h>

int __etoa_l(char *bufferptr, int leng);

General description

The __etoa_l() function converts leng EBCDIC bytes in the buffer pointed to by bufferptr to their ISO8859-1 equivalent. The conversion is performed using the codeset page associated with the current locale.

The argument bufferptr points to a buffer containing the EBCDIC bytes to be converted to their ISO8859-1 equivalent. The input buffer is treated as a sequence of bytes, and all bytes in the input buffer are converted, including any imbedded NULLs.

Returned value

If successful, __etoa_l() converts the input EBCDIC bytes to their equivalent ISO8859-1 value, and returns the number of bytes converted.

If unsuccessful, __etoa_l() returns -1 and sets errno to one of the following values. (This function may internally call iconv_open() and iconv(). The errnos returned by these functions are propagated without modification.)
Error Code
Description
EINVAL
The current locale does not describe a single-byte character set.
ENOMEM
There is insufficient storage to complete the conversion process.

Related information