Mark Phippard wrote:
>1) Command line console input is EBCDIC. - We immediately convert it to
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
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
>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:
>#pragma ccsid(1208) /* UTF-8 */
As I said, I think this isn't (or shouldn't be) necessary.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri Nov 26 12:01:57 2004