[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] use APR's ctypes on EBCDIC systems

From: Branko ─îibej <brane_at_xbc.nu>
Date: Sun, 23 May 2010 23:40:15 +0200

On 21.05.2010 23:18, Greg Ames wrote:
> The current svn_ctype_* implementation depends on ASCII character
> encoding. APR's ctype functions are portable, so use those on EBCDIC
> systems.
>
> A somewhat surprising side effect is that svn messages become mostly
> readable on z/OS with the help of svn_utf__cstring_from_utf8_fuzzy().
>
> I thought it would be more readable to have one #if around the entire
> block of svn_ctype_is* macros rather than around each individual
> macro. I did not want to create a second set of nearly duplicate
> Doxygen docs so I just punted on those. Let me know if you'd prefer
> to see it formatted differently.
>
> Greg
>
> [[[ Use portable ctypes on EBCDIC systems ]]]
>
This is very, very wrong, because we use the ctypes for other things,
not just for string literals. 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.

Others have ported Subversion to EBCDIC systems (I recall an OS/390
port?) 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.

In my opinion, that's what you should be doing, too.

-- Brane
Received on 2010-05-24 10:47:39 CEST

This is an archived mail posted to the Subversion Dev mailing list.