4 ms·
Take the manipulation of the space, for example. Most of us would say that it has a value of 32 as defined by ASCII. This would be wrong on a platform that was
by chasil 3y ago
Take the manipulation of the space, for example.
Most of us would say that it has a value of 32 as defined by ASCII. This would be wrong on a platform that was using EBCDIC.
We all have to make assumptions in our programs, which are sometimes wrong.
- sweetjuly 3y agoHuh, I didn't consider than angle. I said "I don't know" based on the fact that it could exhibit UB if the char container is signed and small enough that it cannot hold 32 * 13. Good to know though that you can't rely on the platform using ASCII!
- mark-r 3y agoSerious question, is there a C compiler that uses EBCDIC?
- chasil 3y agoDefinitely exists for IBM zOS. RedHat Linux has also been ported to this platform; it's probably ASCII, but not sure. Oracle has a native client on zOS that does transparent conversion between ASCII and EBCDIC. It was probably built with such a compiler. There was a paper that the original port of Research UNIX ran as a client on an IBM TSS/370 kernel, which likely was not ASCII. https://gunkies.org/wiki/UNIX/370 https://gunkies.org/wiki/UNIX/370