Larry Rosenman <ler@lerctr.org> writes:
> What about EBCDIC (IBM MainFrame, I.E. Linux on S/390, Z/390).
Right, that was what I meant about not wanting to hardwire assumptions
about ASCII.
We could instead code it as
if (isupper(ch)) ch = ch + ('a' - 'A');
which I believe will work on EBCDIC as well as ASCII. However, it still
breaks down if isupper() claims that anything besides 'A'..'Z' is
uppercase --- and the simple 'A' to 'Z' range check does *not* work in
EBCDIC.
It would be an interesting timewaster to try to get Postgres working on
an EBCDIC platform ;-). I'm sure there are a lot of ASCII dependencies
lurking in the code that would need to be snuffed out. However, that
doesn't mean that I'm eager to add another one here ...
regards, tom lane