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:

asctime

assert

atof

atoi

atol

atoll

bs2cmd

bs2exit

bs2fstat

c16rtomb

c32rtomb

creat

creat64

ctime

ctime64

ecvt

fdopen

fgetc

fgets

fopen

fopen64

fprintf

fputc

fputs

fread

freopen

freopen64

fscanf

fwrite

gcvt

getc

getc_unlocked

getchar

getchar_unlocked

getenv

getlogin

getpgmname

gets

gettsn

_guuid4

isalnum

isalpha

isascii

iscntrl

isdigit

isgraph

islower

isprint

ispunct

isspace

isupper

isxdigit

localeconv

mbrtoc16

mbrtoc32

mktemp

open

open64

perror

printf

putc

putc_unlocked

putchar

putchar_unlocked

putenv

puts

remove

rename

scanf

setenv

setlocale

snprintf

sprintf

sscanf

strcoll

strerror

strftime

strlower

strptime

strtod

strtof

strtoimax

strtold

strtol

strtoll

strtoul

strtoull

strtoumax

strupper

strxfrm

system

tmpnam

tolower

toupper

ungetc

unsetenv

vfprintf

vfscanf

vprintf

vscanf

vsnprintf

vsprintf

vsscanf