__atoe() — ISO8859-1 to EBCDIC string conversion

Standards

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

Format

#include <unistd.h>

int __atoe(char *string);

General description

The __atoe() function converts an ISO8859-1 character string string to its EBCDIC equivalent. The conversion is performed using the codeset page associated with the current locale. The input character string up to, but not including, the NULL is changed from an ISO8859-1 representation to that of the current locale.

The argument string points to the ISO8859-1 character string to be converted to its EBCDIC equivalent.

Returned value

If successful, __atoe() converts the input ISO8859-1 character string to its equivalent EBCDIC value, and returns the length of the converted string.

If unsuccessful, __atoe() 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.

Related information