On 24.05.2010 20:10, Greg Ames wrote:
> On Sun, May 23, 2010 at 5:40 PM, Branko Čibej <brane_at_xbc.nu
> <mailto:brane_at_xbc.nu>> wrote:
>
>
> This is very, very wrong, because we use the ctypes for other things,
> not just for string literals.
>
>
> I'm aware that ctypes are used for other things. I don't see why
> using APR's portable version of ctypes across the board would break
> anything. I couldn't find a reason why subversion requires a custom
> version of ctypes which happens to be non-portable.
Because we assume all strings are in a subset of UTF-8, and those ctypes
are intended for such strings. If you suddenly start using
EBCDIC-specific "portable" ctypes, then other parts of the code are
likely to break horribly. At least, IIRC; it's been a long time since I
was there.
>
> There is a very deep-rooted assumption
> within the code that inside the library, all strings are encoded in (a
> subset of) UTF-8, and that implies that we expect string literals
> to be
> in ascii.
>
>
> There certainly are a lot of string literals that are assumed to be
> UTF-8, agreed.
>
>
> Others have ported Subversion to EBCDIC systems
>
>
> It was OS/400 (aka. iSeries). OS/390 was an earlier brand name for z/OS.
(ISTR now that you had something to do with thosat port, right?)
> but IIRC they always told their compilers to treat the source as
> ASCII. There was a port that used some sort of #pragma or
> preprocessing,
> I don't recall which, to handle string literals, but it died off
> because
> it was too easy to just tell the compiler to do the right thing.
>
>
> printf style format strings and args for other (but not all) library
> functions are expected to have native encoding on z/OS, so using the
> #pragmas is not as easy as I would like.
Oh ouch. That's going to make things realy evil. Imagine, our
translations are coded in UTF-8 and quite a few printf-style format
strings come from there. However ... if I'm not too much mistaken, we
use APR's formatter functions almost everywhere -- I believe the notable
exception are the command-line output functions. Are you sure you can't
just tickle those, makeing them (elegantly) z/OS-specific? For example,
we do some special magic just for the console output on Windows.
-- Brane
Received on 2010-05-25 02:14:11 CEST