A question about EBCDIC compiler

Florian Weimer fw@deneb.enyo.de
Mon Sep 14 08:54:59 GMT 2020


* sotrdg sotrdg via Libc-alpha:

> How does the compiler deal with characters with EBCDIC string
> literals enabled?
>
> How does glibc deal with EBCDIC compiler?

glibc has not been ported to any EBCDIC target, and I doubt it ever
will be ported to an operating systems that's primarily EBCDIC-based.

> For example
>
> printf(“Hello World: %d\n”,4);
>
> What encoding would this be on EBCDIC compiler? Will 4 become
> EBCDIC’s “4” or ASCII’s “4”?

The implementation is expected to output the character '4' for the
number.  The mechanism used for that is not specified.

In practice, I expect it will eventually converted to ASCII or UTF-8
these days because native EBCDIC terminals are extinct.  But on an
EBCDIC system, the program itself will write EBCDIC, it just gets
translated later.

> How does the filename get dealt with on EBCDIC compilers?

That depends a lot on on the operating system and the file system.
That's not really specific to EBCDIC, it's a fairly complex topic
everywhere (even on Linux, despite its generially lenient pathname
syntax).


More information about the Libc-alpha mailing list