You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Paul Burba <pa...@softlanding.com> on 2006/02/20 21:16:15 UTC

[PATCH] #5 OS400/EBCDIC Port: functions that require ebcdic

Hello All,

(Don't know what the OS400/EBCDIC port is about?  See: 
http://svn.haxx.se/dev/archive-2006-02/0519.shtml)

Despite IBM's UTF support, some functions still require EBCDIC strings. 
IBM's documentation says it clearly, if not comprehensively: 

"Nearly all of the run-time routines have been modified to support UTF, 
but there are a handful of them that have not...Other operating system 
routines have not been modified to support UTF.  For example, the IFS 
routines such as open() still accept job CCSID.  Other operating system 
APIs also still accept job CCSID"

The "other APIs" include symlink() and readlink().  This patch converts 
the arguments to these three functions to the required encoding when 
running on OS400.

Please review if you have a moment, thanks, 

Paul B.

[[[
OS400/EBCDIC Port: Convert string args to EBCDIC for functions that
require it.

This is one of several patches to allow Subversion to run
on IBM's OS400 V5R4.

Despite V5R4's UTF support, a handful of functions on OS400 still
require EBCDIC encoded string arguments.

* subversion/libsvn_subr/cmdline.c
   (svn_cmdline_init): Convert string args to open() to EBCDIC.

* subversion/libsvn_subr/io.c
   (SVN_UTF_UTOE_XLATE_HANDLE): New xlate key for UTF-8 (CCSID 1208)
    to EBCDIC (CCSID 0) conversions.
   (svn_io_create_unique_link): Convert string args to symlink() to
    EBCDIC.
   (svn_io_read_link): Convert string args to readlink() to EBCDIC. 
]]]



_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

Re: [PATCH] #5 OS400/EBCDIC Port: functions that require ebcdic

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 20 Feb 2006, Paul Burba wrote:

> Please review if you have a moment, thanks,
>
A few space-before-paren to fix after SVN_ERR; after that, +1.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] #5 OS400/EBCDIC Port: functions that require ebcdic

Posted by Paul Burba <pa...@softlanding.com>.
Malcolm Rowe <ma...@farside.org.uk> wrote on 02/20/2006 05:13:15 
PM:

> On Mon, Feb 20, 2006 at 04:16:15PM -0500, Paul Burba wrote:
> > +#ifdef AS400
> > +#define SVN_UTF_UTOE_XLATE_HANDLE "svn-utf-utoe-xlate-handle"
> > +#endif
> 
> That #define should be included from the relevant header file, not
> duplicated here.  [I am right in thinking that it was added somewhere
> as part of one of your other patches, aren't I?  Ignore me if not.]
> 
> Regards,
> Malcolm

Hi Malcolm,

That symbol is not defined in a header file.  My thought was to follow the 
example of the other SVN_UTF_*TO*_XLATE_HANDLE defines, putting them not 
in a header file but in the *.c file that uses them:

  cmdline.c:
  #define SVN_UTF_CONTOU_XLATE_HANDLE "svn-utf-contou-xlate-handle"
  #define SVN_UTF_UTOCON_XLATE_HANDLE "svn-utf-utocon-xlate-handle"

  utf.c:
  #define SVN_UTF_NTOU_XLATE_HANDLE "svn-utf-ntou-xlate-handle"
  #define SVN_UTF_UTON_XLATE_HANDLE "svn-utf-uton-xlate-handle"

My OS400/EBCDIC patches have added the following (so far):

  io.c:
  #define SVN_UTF_UTOE_XLATE_HANDLE "svn-utf-utoe-xlate-handle"

  cmdline.c:
  #define SVN_UTF_ETOU_XLATE_HANDLE "svn-utf-etou-xlate-handle"

Of course the #defines in utf.c were added way back in 2002 and 
probably(?) haven't gotten much attention since.  Looking at this now, it 
seems *all* the SVN_UTF_*TO*_XLATE_HANDLE symbols should be in svn_utf.h. 
I'm glad to put a patch together that does this if you think it's a better 
approach. 

Let me know, thanks,

Paul B.

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] #5 OS400/EBCDIC Port: functions that require ebcdic

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Mon, Feb 20, 2006 at 04:16:15PM -0500, Paul Burba wrote:
> +#ifdef AS400
> +#define SVN_UTF_UTOE_XLATE_HANDLE "svn-utf-utoe-xlate-handle"
> +#endif

That #define should be included from the relevant header file, not
duplicated here.  [I am right in thinking that it was added somewhere
as part of one of your other patches, aren't I?  Ignore me if not.]

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org