__atoe_l() — ISO8859-1 to EBCDIC conversion operation
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX | both |
Format
#include <unistd.h>
int __atoe_l(char *bufferptr, int leng);
General description
The __atoe_l() function converts leng ISO8859-1 bytes in the buffer pointed to by bufferptr to their EBCDIC equivalent. The conversion is performed using the codeset page associated with the current locale.
The argument bufferptr points to a buffer containing the ISO8859-1 bytes to be converted to their EBCDIC equivalent. The input buffer is treated as sequence of bytes, and all bytes in the input buffer are converted, including any imbedded NULLs.
Returned value
If successful, __atoe_l() converts the input IOS8859-1 bytes to their equivalent EBCDIC value, and returns the number of bytes that were converted.
If unsuccessful, __atoe_l() returns -1 and sets errno to
one of the following values:
- 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.
Note: This function may internally call iconv_open()
and iconv(). The errnos returned by these functions are propagated
without modification.