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

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

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-02-24 16:40:39 CET

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.
_____________________________________________________________________________

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

Received on Fri Feb 24 16:46:17 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.