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

Re: EBCDIC - was: (svn commit: r12029 - trunk/subversion/libsvn_client)

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-11-26 12:00:23 CET

Mark Phippard wrote:

>1) Command line console input is EBCDIC. - We immediately convert it to
>UTF-8.
>
>
Subversion already does this itself if APR knows it's on an EBCDIC system.

>2) In our case, APR is provided with OS/400, and is EBCDIC based. So all
>OS calls and all APR calls, require EBCDIC. For example, to open a file,
>the path anf filename have to be passed in EBCDIC. To solve this, we added
>a "wrapper" layer where we convert the necessary string to/from EBCDIC. We
>link Subversion against our wrapper, and the wrapper then calls APR or
>system.
>
>
Subversion does this, too. Are you actually writing an _addional_
wrapper? Why doesn't Subversion's translation code already work for you?
I know there are some ommissions in it, but in general, it should work.

>3) Literals in source code are compiled as EBCDIC. If comparing against a
>UTF-8 value, it will fail. This is solved, at least on OS/400, by adding a
>#pragma directive in the source to tell the compiler that the literals
>should be treated as UTF-8. For the most part, we just globally declare
>these pragmas, and in the rare instance we need the literal in EBCDIC, we
>add another #pragma to set it back.
>
>
Yes, you noticed that SVN sometimes converts string literals to UTF-8
itself, and sometimes it doesn't. This is the real problem, and I don't
know how to solve it (portably) without converting _every_ literal,
which would be a bit of a pain. Of course it would be nice if SVN could
expect every literal to be in UTF-8 (we really only care about the ASCII
subset anyway).

>I have been meaning to ask, do you think we could get committter access to
>an "OS400 or "EBCDIC" branch at some point? We intend to contribute back
>and support this port and it would be easier to do it in the main
>repository. Currently, I am using svk to mirror the 1.1.x branch to a
>local repository where we can do our work and stay in synch. We would
>probably continue as we are doing currently until we get the mod_dav_svn
>piece working. But then we would like to clean things up a bit and get in
>a branch where it can be reviewed. 95% of the patch is just in new
>"wrapper" layer that would not be built on other platforms. In the
>Subversion source code, there is generally just a small bit added at in the
>#include's. Something like:
>
>#ifdef APR_CHARSET_EBCDIC
>#pragma ccsid(1208) /* UTF-8 */
>#include "apr_wrap.h"
>#endif
>
>
As I said, I think this isn't (or shouldn't be) necessary.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 26 12:01:57 2004

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