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/24 15:40:39 UTC

[PATCH] #7 OS400/EBCDIC Port: Make svn_io_copy_file() CCSID insensitive.

Hello All,

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

Following on the heels of my last patch comes another related to file 
CCSIDs - see http://svn.haxx.se/dev/archive-2006-02/1298.shtml for more on 
the horror of CCSIDs.  That noise you hear is Julian throwing himself off 
a cliff after reading this...or possibly plotting to throw me off a cliff 
8-o

On OS400 apr_file_copy() is sensitive to the source and destination files' 
CCSIDs in that it attempts to convert the contents of the source file from 
its CCSID to the CCSID of the destination file.  If the files' CCSIDs 
differ from each other and/or the system CCSID, the destination file is 
likely to be corrupted.

My solution in the pre-V5R4 port (a.k.a. /svn/branches/ebcdic) was to add 
a function (very closely) based on apr_file_transfer_contents() from 
srclib/apr/file_io/unix/copy.c that copies the file in a CCSID-insensitive 
manner.

I looked at this problem afresh for V5R4 and despite coming up with a lot 
of ideas, I didn't see a better solution.  So I further streamlined and 
recommented the ebcdic branch approach and here it is for your 
consideration, let me know what you think, thanks.

Paul B. 

----------------------------------------------------------------------
[[[
OS400/EBCDIC Port: Make svn_io_copy_file CCSID insensitive.

This is one of several patches to allow Subversion to run on IBM's
OS400 V5R4.  It makes svn_io_copy_file() insensitive to the CCSIDs of
the source and destination files, thereby preventing potential OS400
conversion of the files' contents.

* subversion/libsvn_subr/io.c
   (os400_file_copy): New function.
   (svn_io_copy_file): Replace call to apr_file_copy() with new
    function.
]]]


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

Re: [PATCH] #7 OS400/EBCDIC Port: Make svn_io_copy_file() CCSID insensitive.

Posted by Branko Čibej <br...@xbc.nu>.
Paul Burba wrote:
> Hello All,
>
> (Don't know what the OS400/EBCDIC port is about?  See: 
> http://svn.haxx.se/dev/archive-2006-02/0519.shtml)
>
> Following on the heels of my last patch comes another related to file 
> CCSIDs - see http://svn.haxx.se/dev/archive-2006-02/1298.shtml for more on 
> the horror of CCSIDs.  That noise you hear is Julian throwing himself off 
> a cliff after reading this...or possibly plotting to throw me off a cliff 
> 8-o
>
> On OS400 apr_file_copy() is sensitive to the source and destination files' 
> CCSIDs in that it attempts to convert the contents of the source file from 
> its CCSID to the CCSID of the destination file.  If the files' CCSIDs 
> differ from each other and/or the system CCSID, the destination file is 
> likely to be corrupted.
>   
That just made _me_ jump out the window. Luckily I'm on the second 
floor, it was only a 6m drop.

-- Brane


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