Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

C library functions that support ASCII encoding

&pagelevel(4)&pagelevel

For every library function in the C runtime system that works with characters and/or strings or returns a character or string (e.g. printf), there is:

  • an implementation of the function for processing characters and/or strings in EBCDIC format

  • an implementation of the function for processing characters and/or strings in ASCII format

  • a macro define that maps the original function (EBCDIC format) to the associated ASCII function

The prototype of an ASCII function and the associated define are stored in the include file in which the corresponding original file is declared. This has the advantage that no additional include files are required to use ASCII-encoded characters and strings, with the possible exception of <ascii_ebcdic.h> (see "Explicitly switching between EBCDIC and ASCII encoding").

Names of the ASCII functions

The syntax of the names of the ASCII functions is as follows:

__originalfunction_ascii()

The name of the original function should be specified for originalfunction.

The ASCII variant of printf(), for example, is __printf_ascii().

C library functions for which there is an ASCII function

There is an ASCII variant for each of the following C library functions:

atol

creat

fdopen

fprintf

freopen64

getenv

isalpha

islower

localeconv

perror

setlocale

strlower

strtoul

toupper

asctime

atoll

creat64

fgetc

fputc

fscanf

getpgmname

isascii

isprint

mknod

printf

snprintf

strptime

strtoull

ungetc

assert

basename

ctime

fgets

fputs

fwrite

gets

iscntrl

ispunct

mktemp

remove

sprintf

strtod

strupper

vfprintf

atof

bs2exit

ctime64

fopen

fread

gcvt

gettsn

isdigit

isspace

open

rename

sscanf

strtol

tmpnam

vsnprintf

atoi

bs2fstat

ecvt

fopen64

freopen

getc_unlocked

isalnum

isgraph

isupper

open64

scanf

strerror

strtoll

tolower

vsprintf